Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I update to the latest MongoDB with Homebrew?

I have version 2.0.2 of mongo installed on my mac, which I installed using Homebrew. The course I'm taking is using the 'aggregate' function, which is only available in version 2.2 of Mongo. I tried to do

 brew upgrade mongodb 

and I get

Error: mongodb already upgraded 

Is there a way to install the latest version of Mongo with Homebrew?

like image 585
BrainLikeADullPencil Avatar asked Nov 02 '12 01:11

BrainLikeADullPencil


People also ask

Does Homebrew automatically update packages?

Today by default, everytime you install a new package, brew will go ahead and automatically update all of my system packages to their latest versions.


2 Answers

If the version of mongodb in your brew receipe is the same of the version installed, you get the stated error.

Typically when you see a latest stable version released and you wish to bump up your mongodb version to it, you'd first have to update your brew receipe and then do your upgrade as you did.

That means you'd first do

brew update 

and then

brew upgrade mongodb 
like image 192
karthiks Avatar answered Nov 08 '22 11:11

karthiks


This command should update your homebrew formulae to their latest version:

brew update 

And then:

brew upgrade mongodb 

To install the latest version of mongodb.

like image 20
edouardbriere Avatar answered Nov 08 '22 10:11

edouardbriere