我将官方的 10gen Debian repo 添加到我的 Wheezy 安装中,但 MongoDB 仍然无法卸载:
Setting up mongodb-10gen (2.4.4) ...
[FAIL] Starting database: mongodb failed!
invoke-rc.d: initscript mongodb, action "start" failed.
dpkg: error processing mongodb-10gen (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up mmv (1.01b-15) ...
Errors were encountered while processing:
mongodb-10gen
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up mongodb-10gen (2.4.4) ...
[FAIL] Starting database: mongodb failed!
invoke-rc.d: initscript mongodb, action "start" failed.
dpkg: error processing mongodb-10gen (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
mongodb-10gen
有人成功将 MongoDB 安装为 .deb 吗?
答案1
我也遇到了同样的问题。我按照以下说明操作:
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian/
降级后
apt-get install mongodb-10gen=2.2.3
它开始了
[ ok ] Starting database: mongodb.
如果您想要使此更改在后续更新中永久生效,请将此包标记为保持状态使用:
apt-mark hold mongodb-10gen
答案2
如果您使用的是虚拟机,并且启动时虚拟机的大小相对较小,则可能是因为可用空间不足。在此阶段,MongoDB 将创建日志文件,您需要至少 3379MB 的可用空间。
否则,请检查日志,其位置应为:
/var/log/mongodb/mongod.log