当我运行MongoDB时,我通常手动启动它(即它不是我登录启动项目的一部分),我很擅长在关闭之前停止服务.
我最近重新启动了我的笔记本电脑,并在运行时收到一个错误:
brew services run mongodb/brew/mongodb-community
错误消息如下:
错误:#<;公式mongodb-Community(STRATE)/usr/local/Homebrew/Library/Taps/mongodb/homebrew-brew/Formula/mongodb-community.rb>;的方法`plist_start‘未定义
我不完全确定发生了什么.我还没有安装任何重大更新,也没有对我的环境进行任何修改.
我try 了什么
我完全卸载了MongoDB,然后才重新安装:
# Uninstall each component of mongodb-community...
brew uninstall mongodb/brew/mongodb-community
brew uninstall mongodb/brew/mongodb-database-tools
brew uninstall mongosh
# Reinstall all of the above...
brew install mongodb/brew/mongodb-community
Current Install
mongod --version
个
db version v7.0.2
Build Info: {
"version": "7.0.2",
"gitVersion": "02b3c655e1302209ef046da6ba3ef6749dd0b62a",
"modules": [],
"allocator": "system",
"environment": {
"distarch": "x86_64",
"target_arch": "x86_64"
}
}
Could be Homebrew...?
老实说,有时在这些深夜,我处于自动驾驶状态.在某种程度上,我可能跑过brew upgrade
分,也可能没有跑过.我会调查这件事是否发生过.同时,当我在Homebrew中获得MongoDB的日志(log)时,我甚至没有看到会影响我的提交:
brew log mongodb/brew/mongodb-community
# Yields...
commit f33a59b6642f6a9f47f84b390dd71c386998cce6
Author: Zack Winter <zack.winter@mongodb.com>
Date: Wed Oct 4 23:24:26 2023 +0000
Update paths with mr script
commit 7f3db6dbe9231300cc61645c68686a970b575f1f
Author: Zack Winter <zack.winter@mongodb.com>
Date: Tue Oct 3 20:00:06 2023 +0000
SERVER-80537 update formulas for 7.0.1 release
commit 5055c34131148681885ea2241abccfc603596295
Author: Alexander Neben <alexander.neben@mongodb.com>
Date: Fri Aug 18 10:54:02 2023 -0700