Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trouble reinstalling MongoDB with Homebrew using OS X 10.10 Yosemite Beta

To reiterate, I'm running the first OS X 10.10 beta, and attempting to reinstall MongoDB with Homebrew.

After running $ brew install mongodb, this is the output:

==> Downloading http://downloads.mongodb.org/src/mongodb-src-r2.6.1.tar.gz ==> /usr/local/opt/scons/bin/scons install --prefix=/usr/local/Cellar/mongodb/2.6.1 -j8 --cc=/usr/bin/clang --cxx=/usr/bin/clang++ --osx-version-min=10.10 --full --64 scons: Reading SConscript files ... Mkdir(".scons/Darwin/nohost") usage: scons [OPTION] [TARGET] ...  SCons Error: option --osx-version-min: invalid choice: '10.10' (choose from '10.6', '10.7', '10.8', '10.9') 

Obviously the install package isn't configured for 10.10 because it isn't released to the public yet.

Is there a way to manually bypass this during the build process?

like image 983
joshferrara Avatar asked Jun 05 '14 05:06

joshferrara


People also ask

Do I need Xcode for Mongodb?

MacOS Mongo Shell Installation: Requirements To install MacOS Mongo shell on your Mac, your system must meet the requirement of having Xcode command-line tools and Homebrew installed before proceeding to install the MongoDB community edition.


2 Answers

This will probably be fixed in newer versions of MongoDB (https://jira.mongodb.org/browse/SERVER-14204), for now simply patch the formula.

brew edit mongodb 

Find the block that looks like this:

args = %W[   --prefix=#{prefix}   -j#{ENV.make_jobs}   --cc=#{ENV.cc}   --cxx=#{ENV.cxx}   --osx-version-min=#{MacOS.version} ] 

And change the OS X version min to 10.9, like so:

args = %W[   --prefix=#{prefix}   -j#{ENV.make_jobs}   --cc=#{ENV.cc}   --cxx=#{ENV.cxx}   --osx-version-min=10.9 ] 

EDIT: Extra step for DP3, DP4, PB1

Still in the file, add the following 3 lines just above def install.

  def patches     { :p1 => 'https://gist.githubusercontent.com/LinusU/a1771562fec0201c54cd/raw/98825f9fbe93b8cc524e05a9c0e99864e8301731/mongodb.diff' }   end 

And then perform upgrade:

brew upgrade mongodb 
like image 110
Linus Unnebäck Avatar answered Oct 15 '22 20:10

Linus Unnebäck


Just to mention – this issue has been fixed.
Built and installed today (10/13/2014) via $ brew install mongodb

==> Summary 🍺  /usr/local/Cellar/mongodb/2.6.5: 17 files, 331M, built in 21.6 minutes 
like image 39
ajndl Avatar answered Oct 15 '22 20:10

ajndl