Software⏱️ 3 min read📅 2026-06-11

How to Fix: Error: mongodb: unknown version :mountain_lion

Error fixing mongodb unknown version :mountain_lion

Quick Answer: Try reinstalling mongodb with brew, and then re-create your databases.

The error 'mongodb: unknown version :mountain_lion' occurs when attempting to install or upgrade MongoDB using Homebrew on a Mac. This issue affects users who have recently updated their operating system to macOS Monterey (also known as Mountain Lion) and are trying to use the latest version of MongoDB.

This error can be frustrating, especially for developers who rely on MongoDB for their projects. In this guide, we will walk you through the root causes of this issue and provide steps to resolve it.

🛑 Root Causes of the Error

  • The primary reason for this error is that Homebrew does not support MongoDB versions prior to v3.6.0. When you try to install or upgrade MongoDB using Homebrew, it checks the version of MongoDB installed on your system. If the version is older than v3.6.0, it throws an 'unknown version' error.
  • Another possible cause could be that the MongoDB installation directory has been deleted or corrupted, causing Homebrew to lose track of the correct version.

✅ Best Solutions to Fix It

Reinstalling MongoDB from Source

  1. Step 1: Download the MongoDB installer for your architecture (x86_64) from the official MongoDB website.
  2. Step 2: Run the downloaded installer and follow the prompts to install MongoDB. Make sure to select the correct version (v3.6.0 or later).
  3. Step 3: After installation, run `brew upgrade mongodb` to update Homebrew's knowledge of the installed MongoDB version.

Restoring MongoDB from a Backup

  1. Step 1: If you have a backup of your MongoDB data directory, restore it to its original location.
  2. Step 2: Run `brew reinstall mongodb` to reinstall MongoDB and link it to the restored data directory.

✨ Wrapping Up

To resolve the 'mongodb: unknown version :mountain_lion' error, try reinstalling MongoDB from source or restoring it from a backup. If you have any issues during the process, refer to the official MongoDB documentation for further assistance.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions