【发布时间】:2019-05-05 03:51:20
【问题描述】:
我已按照MongoDB docs 上的说明使用自制软件在 Mac 上安装 MongoDB:
brew tap mongodb/brew
brew install mongodb-community@4.0
然后我可以在前台运行它:
mongod --config /usr/local/etc/mongod.conf
但是,当尝试将其作为服务启动时:
brew services start mongodb-community@4.0
我收到此错误:
Error: mongodb-community: uninitialized constant #<Class:0x00007ff189061008>::Gem
我在运行brew doctor时也遇到这个错误:
Warning: Some installed formulae are not readable:
mongodb-community: uninitialized constant #<Class:0x00007ffd903152a0>::Gem
为什么会这样?我该如何解决?
谢谢!
【问题讨论】:
-
能否请您检查它是否运行良好而不作为mac os服务运行打开终端并运行命令mongod
-
刚刚更新了问题。是的,我可以在前台运行它。
-
您的 MacOS 的具体版本是什么? (从终端检查的一种方法是
sw_vers -productVersion) -
MacOS 版本:10.14.4
-
有人找到解决方案了吗?我也遇到了同样的问题,现在拉头发好几个小时了。