Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k views
in Technique[技术] by (71.8m points)

mongodb - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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 mongodb-community@4.4".

That worked for me and MongoDB is installed.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...