在Mac OS X上卸载MongoDB

jas*_*lew 23 mongodb

当我尝试从终端运行mongod时,我收到以下错误:

2014-07-02T23:56:24.797-0700 [initandlisten] ERROR:听():绑定()失败错误号:48个地址已在使用对插座:0.0.0.0:27017 2014-07-02T23:56:24.797-0700 [initandlisten]错误:addr已在使用中

我最近意识到我的Mac上有两个版本的MongoDB,并认为这可能是上述错误的来源.(另外,我不需要两个版本.)我尝试使用谷歌搜索,但无法找到有关如何卸载的明确说明.我有开发版本2.7.0和2.6.3.

非常感谢您的帮助!

Anu*_*iku 65

运行以下命令从启动/启动中删除mongodb并使用Homebrew卸载它:

# See if mongo is in the launch/startup list
launchctl list | grep mongo

# Remove mongodb from the launch/startup
launchctl remove homebrew.mxcl.mongodb

# Kill the mongod process just in case it's running
pkill -f mongod

# Now you can safely remove mongodb using Homebrew
brew uninstall mongodb
Run Code Online (Sandbox Code Playgroud)

只需双重检入/usr/local/bin/以确保删除mongodb命令.

  • https://medium.com/@rajanmaharjan/uninstall-mongodb-macos-completely-d2a6d6c163f9。我觉得这是非常有用和全面的 (4认同)
  • 如果未与brew一起安装,应如何卸载?`11月30日星期四04:42:56:〜/ CS460_660 $ brew卸载mongodb错误:没有这样的桶:/ usr / local / Cellar / mongodb` (2认同)

小智 17

为了卸载社区版本,我发现该命令brew uninstall mongodb-community对我有用


小智 10

Nitin Jadhav版本对我有用brew uninstall mongodb一直给我Error: No such keg: /usr/local/Cellar/mongodb。我正在删除一个 mongodb 社区。使用cd /usr/local/Cellar然后运行ls -a然后运行rm -rf mongodb-community将其删除