Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

brewからmongodbがなくなったのでmongodb-communityをインストールする

More than 1 year has passed since last update.

はじめに

MongoDBが必要だからインストールしようと思って

$ brew install mongodb

Error: No available formula with the name "mongodb"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

と怒られたのでインストール方法を残す

方法

ちなみにbrew search mongodbすると

$ brew search mongodb

==> Casks
gcollazo-mongodb                                            mongodb-compass-community                                   mongodb-compass-readonly                                    nosqlbooster-for-mongodb
mongodb-compass                                             mongodb-compass-isolated-edition                            mongodbpreferencepane                                       homebrew/cask-versions/mongodb-compass-beta

なくなってる。。

どうやら、MongoDBがOSSじゃなくなったらしいので以下を実行

$ brew tap mongodb/brew

==> Tapping mongodb/brew
Cloning into '/usr/local/Homebrew/Library/Taps/mongodb/homebrew-brew'...
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 13 (delta 4), reused 5 (delta 1), pack-reused 0
Unpacking objects: 100% (13/13), done.
Tapped 6 formulae (46 files, 60.1KB).

$ brew install mongodb-community

==> Installing mongodb-community from mongodb/brew
==> Downloading https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-4.2.1.tgz
######################################################################## 100.0%
==> Caveats
To have launchd start mongodb/brew/mongodb-community now and restart at login:
  brew services start mongodb/brew/mongodb-community
Or, if you don\'t want/need a background service you can just run:
  mongod --config /usr/local/etc/mongod.conf
==> Summary
🍺  /usr/local/Cellar/mongodb-community/4.2.1: 21 files, 273.5MB, built in 26 seconds

$ brew services start mongodb-community

==> Successfully started `mongodb-community` (label: homebrew.mxcl.mongodb-community)

これで使えるようになる

ちなみにbrew tapなるものを初めて使ったが、

brew tapとは公式以外のリポジトリをフォーミュラとしてHomebrewに追加するもので、brewのもとでinstall,uninstall,updateなどが行えます。もちろん自分が公開しているものも簡単に追加できます。

(引用) brew tapとは
らしいです。

kazuki5555
PHPとかLaravelとかDockerとかGCPとか PythonかじったりGoかじったり
https://kazuki5555.github.io/Portfolio/#/
cgate
クリーンなアドテクノロジーを目指して、安心して利用いただけるサービスを!
https://www.cgate.jp/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away