当我试图从终端运行mongod时,我得到了以下错误:
2014-07-02T23:56:24.797-0700初始化并侦听错误: listen():bind()失败errno:48套接字地址已在使用: 0.0.0.0:27017 2014-07-02T23:56:24.797-0700初始化并侦听错误: addr已在使用中
我最近意识到我的苹果电脑上有两个版本的MongoDB,我想这可能是导致上述错误的原因。(另外,我不需要两个版本。)我尝试了谷歌,但找不到明确的方向,我可以如何卸载。我的开发版本是2.7.0和2.6.3。
提前感谢您的帮助!
发布于 2015-10-14 00:57:51
运行以下命令将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只需在/usr/local/bin/中仔细检查,以确保mongodb命令已删除。
发布于 2020-08-19 23:14:14
在卸载社区版本时,我发现命令brew uninstall mongodb-community对我很有效
发布于 2020-05-22 16:02:28
Nitin Jadhav版本适用于我,brew uninstall mongodb一直给我提供Error: No such keg: /usr/local/Cellar/mongodb。我正在删除一个mongodb社区。使用cd /usr/local/Cellar,然后运行ls -a,然后运行rm -rf mongodb-community将其删除
https://stackoverflow.com/questions/24547016
复制相似问题