Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does the mongocli support a formula URL for Apple M1 chips?

As per the installation instructions, when running:

brew tap mongodb/brew

I get the following error:

Error: Invalid formula: /opt/homebrew/Library/Taps/mongodb/homebrew-brew/Formula/mongocli.rb

formulae require at least a URL

Error: Cannot tap mongodb/brew: invalid syntax in tap!

I do comply with prerequisites (updated xcode and brew). I made sure to run brew update and brew doctor.

At this point, I looked for answers on the mongodb/homebrew-brew repo and saw a very recent commit for the mongocli.

Apparently, it defines URLs for Mac and Linux machines that have Intel chips but no mention of Apple M1 chips. This is blocking me from tapping mongodb at the moment. Would you know of any workaround or am I making a mistake somewhere?

like image 804
stelloprint Avatar asked Feb 26 '21 06:02

stelloprint


People also ask

What is the M1 Ultra chip?

M1 Ultra is the world’s most powerful and capable chip for a personal computer. Cupertino, California Apple today announced M1 Ultra, the next giant leap for Apple silicon and the Mac.

Is Apple’s M1 chip unpatchable?

On June 10, 2022, MIT’s Computer Science and Artificial Intelligence Laboratory (CSAIL) released a report outlining an unpatchable flaw with Apple’s popular M1 chip. Found in millions of MacBooks, iMacs, and iPads across the world, the Apple M1 chip has been a crucial part of the company’s ecosystem since 2020.

What is Apple M1 Ultra Mac?

Available in the all-new Mac Studio, M1 Ultra brings unprecedented performance to the desktop M1 Ultra is the world’s most powerful and capable chip for a personal computer. Cupertino, California Apple today announced M1 Ultra, the next giant leap for Apple silicon and the Mac.

What is the Apple m2 chip?

That debut is significant because the M2 heralds the arrival of a second generation of Apple silicon for Macs. It's an evolution of the remarkable M1 chip Apple launched in 2020, which blew us away with how much it improved performance and power efficiency in the 13-inch MacBook Pro M1 , MacBook Air M1, and Mac mini M1 .


3 Answers

Just had the same problem ...

Go to Finder > Utilities and right click on Terminal and select "Get Info" Find the option "Open using Rosetta" and check it.

Open new Terminal and run "brew tap mongodb/brew" After it completes close the terminal and uncheck "Open using Rosetta", open Terminal again and then run "brew install [email protected]".

That worked for me and MongoDB is installed.

like image 115
markoram Avatar answered Oct 19 '22 08:10

markoram


Try the following command

arch -arm64 brew install [email protected]
like image 33
Luís Garcés Avatar answered Oct 19 '22 06:10

Luís Garcés


You can simply run any command under Rosetta on M1 macs by prefixing the command

arch -x86_64

For your use case try

arch -x86_64 brew tap mongodb/brew 
brew install [email protected]  
like image 1
CodeforCore Avatar answered Oct 19 '22 06:10

CodeforCore