Can't upgrade mongodb

(Rcilio) #1

Greetings all!. I’m currently running OS X El Capitan (10.11.6) on a 2012 machine. A full version of Xcode 8.2.1 is also installed. While attempting to ‘brew upgrade mongodb’ I received the following error:

mongodb: A full installation of 8.3.2 is required to compile this software.
Installing just the Command Line Tools is not sufficient.
Xcode can be installed from the App Store.
Error: An unsatisfied requirement failed this build.

I don’t believe I can install a higher version of Xcode on my machine without upgrading to Sierra, which I didn’t really want to do at this time. Is there a workaround for upgrading mongodb, or should I uninstall it and reinstall it without using Homebrew as a package manager? Many thanks!

(DJ Holt) #2

I am experiencing this exact issue as well. Any workaround here? Thanks!

(Jacob Ledbetter) #3

you should be able to to use brew info mongodb and determine the version that you need to use. Then use brew reinstall mongodb "version" to revert.

(Rcilio) #4

Just to be clear, the problem for me is not that the latest version of mongodb is incompatible with my operating system (El Capitan 10.11.6), it’s that the xcode build required to install the latest mongodb on my machine is. I have Xcode 8.2.1 but is seems that Xcode 8.3.2 is required to brew upgrade mongodb to the latest version. Xcode 8.3.2 is incompatible with El Capitan. I could install the latest mongodb directly from the source, but then it would no longer be mananged by homebrew.

(Joe) #5


I am in the same boat. I am running El Capitan 10.11.6 as well and am prompted to install Xcode 8.3.2 when I try to download the latest mongodb driver.

The problem as you pointed out is that Xcode 8.3.2 is not compatible with El Capitan. If you’re ambitious, I found a GitHub repo that could help:

The author gives fair warning – it’s pretty nasty and not for the faint of heart.

I think I’m going to have to bite the High Sierra bullet. If you try it and works, let us know. Good luck!

(Ashley Raiteri) #6

This worked for me:
(in similar situation)
brew search mongo:
==> Searching local taps…
mongo-c-driver mongo-orchestration mongodb@3.0 mongodb@3.4 percona-server-mongodb
mongo-cxx-driver mongodb mongodb@3.2 mongoose

brew install mongodb@3.4

all good after that.

(Shine) #7

That’s ingenious!
Works like a charm (similar situation)
Thank you @ashrocket!