1

Running the command brew tap mongodb/brew: i ran into the following. I ran into the following :

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!

damisparks
  • 93
  • 1
  • 10

3 Answers3

2

My Solution :

  • 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 Run

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  • 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.

This did not work for me so i tried this:

  • Then run this : arch -arm64 brew install mongodb-community@4.4 And it worked.

I suggest you find the one that works for you. Thanks to these articles.

damisparks
  • 93
  • 1
  • 10
2

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".

0

Run these two commands in your terminal to add Homebrew to your PATH: (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/<>/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"