老师,帮忙看一下安装问题

老师,帮忙看一下安装问题

Lily@xiaoxiannvdeMacBook-Pro homebrew-core % brew --version

Homebrew 3.2.3-59-gb18bbac

Homebrew/homebrew-core (no Git repository)

Homebrew/homebrew-cask (git revision 81ce2d0f9a; last commit 2021-07-22)

Lily@xiaoxiannvdeMacBook-Pro homebrew-core % cd "$(brew --repo)"

Lily@xiaoxiannvdeMacBook-Pro Homebrew % git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

Lily@xiaoxiannvdeMacBook-Pro Homebrew % cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"

Lily@xiaoxiannvdeMacBook-Pro homebrew-core % git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

Lily@xiaoxiannvdeMacBook-Pro homebrew-core % brew install mongodb-community

error: Not a valid ref: refs/remotes/origin/master

==> Installing mongodb-community from mongodb/brew

Warning: No available formula with the name "mongosh" (dependency of mongodb/brew/mongodb-community). Did you mean mongocli?

==> Searching for similarly named formulae...

This similarly named formula was found:

mongocli

To install it, run:

  brew install mongocli

It was migrated from mongodb/brew to homebrew/core.

Lily@xiaoxiannvdeMacBook-Pro homebrew-core % brew services start mongodb-community

Error: Formula `mongodb-community` is not installed.

Lily@xiaoxiannvdeMacBook-Pro homebrew-core % 


问题描述:

mongodb-community安装不成功,老师帮忙看一下。

正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

2回答
好帮手慕星星 2021-07-23 15:32:25

同学你好,运行到这里的警告就自动停止了吗?还是说同学手动停止的呢?

http://img1.sycdn.imooc.com//climg/60fa67240940509108490112.jpg

安装过程时间较长,可以等待一会。

为了避免之前安装有残留,可以先卸载再安装

卸载:
brew uninstall mongodb-community
设置和安装:
brew tap mongodb/brew
brew install mongodb-community

建议按照这个流程再来一遍。

好帮手慕星星 2021-07-23 09:46:09

同学你好,是在这一步骤报错的吗?

http://img1.sycdn.imooc.com//climg/60fa1e2709c1690707360096.jpg

建议按照报错提示,先安装mongocli试试


http://img1.sycdn.imooc.com//climg/60fa1df9093e89bd08290381.jpg

如果还是没有成功的话,建议先执行第一步

http://img1.sycdn.imooc.com//climg/60fa1f4d098e7b0f09690465.jpg


然后再安装试试。祝学习愉快!

  • 提问者 慕大仙er #1

    都试过了,还是装不上。老师帮忙看一下。

    Lily@xiaoxiannvdeMacBook-Pro homebrew-core % brew tap mongodb/brew

    Lily@xiaoxiannvdeMacBook-Pro homebrew-core % brew install mongodb-community

    ==> Installing mongodb-community from mongodb/brew

    Warning: No available formula with the name "mongosh" (dependency of mongodb/brew/mongodb-community). Did you mean mongocli?

    ==> Searching for similarly named formulae...

    This similarly named formula was found:

    mongocli 

    To install it, run:

      brew install mongocli 

    It was migrated from mongodb/brew to homebrew/core.

    Lily@xiaoxiannvdeMacBook-Pro homebrew-core % brew install mongocli 

    Warning: mongodb/brew/mongocli 1.16.0 is already installed and up-to-date.

    To reinstall 1.16.0, run:

      brew reinstall mongocli

    Lily@xiaoxiannvdeMacBook-Pro homebrew-core % brew reinstall mongocli

    Warning: mongodb/brew/mongocli has been deprecated because it moved to hombrew-core!

    ==> Downloading https://github.com/mongodb/mongocli/releases/download/v1.16.0/mo

    Already downloaded: /Users/Lily/Library/Caches/Homebrew/downloads/1683ef4e26482f856caf4ac4715fde017a7075f90e59670fe2650cc0c2d990b0--mongocli_1.16.0_macos_x86_64.zip

    ==> Reinstalling mongodb/brew/mongocli 

    ==> Caveats

    zsh completions have been installed to:

      /usr/local/share/zsh/site-functions

    ==> Summary

    ?  /usr/local/Cellar/mongocli/1.16.0: 8 files, 13.7MB, built in 9 seconds

    Lily@xiaoxiannvdeMacBook-Pro homebrew-core % brew install mongodb-community

    ==> Installing mongodb-community from mongodb/brew

    Warning: No available formula with the name "mongosh" (dependency of mongodb/brew/mongodb-community). Did you mean mongocli?


     



    2021-07-23 10:42:07
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师