mongoDB shell update on Mac_M1

I just installed mongodb on my mac m1 using homebrew, and it tells me that its version is

        MongoDB shell version v4.2.0

       ***git version: a4b751dcf51d*********************0cfd1c0129c30***

       ***allocator: system***

       ***modules: none***

       ***build environment:***

       ***distarch: x86_64***

       ***target_arch: x86_64***

However, the current version I see on the Community download site is 4.4.6.

I’ve searched high and low online, and can’t see any terminal command to update the mongoDB shell. It seems that the shell install’s tied into the overall mongoDB install, but as I’m using the Cloud, that’s overkill.

Could anyone provide advice how I’d do that?

Hi @George_Hughes1,

Have you update homebrew lately?

In case homebrew doesn’t give you the correct binaries download the tar.gz package from our download center and use only the mongo binary:
https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-4.4.6.tgz

Otherwise you can try our new mongosh which can be downloaded and installed via brew. Please note that this will be the new shell forward.

Thanks
Pavel

Hi @Pavel_Duchovny
Thanks for your quick and clear response. I shall try the mongosh beta and report back any issues on this same thread.
Regards,
GEorge

Hi @George_Hughes1,

One possibility is that you have a 4.2.0 mongo shell version in your path which is being found before a later version installed by Homebrew. On an M1 mac the Homebrew path should be /opt/homebrew so you could check the path for mongo using which:

> which mongo
/opt/homebrew/bin/mongo

If the path to mongo is as expected, I would then try:

brew update; brew upgrade mongodb-community

Alternatively, you can also specify installing a 4.4 shell:

brew install mongodb-community@4.4

Regards,
Stennie

In case you want the mongosh binary instead of installing it via Homebrew, we have it available for M1 in our download center: MongoDB Shell Download | MongoDB

1 Like

Thanks for the suggestion.

Does this mean uninstalling HomeBrew, and all of it’s related directories etc? I’m not clear on the level of overhead HomeBrew adds to the system, or how to go about the uninstall as it pertains to the system overall?

Any suggested links?

Thanks,

fastrkr

No need to uninstall Homebrew. If you have already installed mongosh via Homebrew and that does not work well, you can uninstall it with brew uninstall mongosh.

Then, you can just download the zip from MongoDB Shell Download | MongoDB and follow the instructions here: https://docs.mongodb.com/mongodb-shell/install/#install-from-.zip-file.

1 Like

hey @Stennie_X any input on how manage different versions, when specifying it at the moment of installing?