我在我的debian wheezy 7.7服务器上运行了mongo 2.6.6的功能安装。我可以运行mongo并与其中的数据库和集合进行交互。它似乎运行没有问题。但每次我通过以下方式运行软件更新:
sudo apt-get update
sudo apt-get upgrade
我得到以下输出:
Setting up mongodb-org-server (2.6.6) ...
[FAIL] Starting database: mongod failed!
invoke-rc.d: initscript mongod, action "start" failed.
dpkg: error processing mongodb-org-server (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mongodb-org:
mongodb-org depends on mongodb-org-server; however:
Package mongodb-org-server is not configured yet.
dpkg: error processing mongodb-org (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mongodb-org-server
mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)
搜索解决此问题的解决方案让我service mongod start on debian doesnt work。我导出了这些环境变量并重试,但错误仍然存在。更多信息:
...:~$ mongod --version
db version v2.6.6
2014-12-21T10:55:55.685-0600 git version: 608e8bc319627693b04cc7da29ecc300a5f45a1f
...:~$ mongodb --version
bash: mongodb: command not found
...:~$ sudo service mongod start
[FAIL] Starting database: mongod failed!
...:~$ sudo service mongod stop
[ ok ] Stopping database: mongod apparently not running.
...:~$ sudo service mongodb start
[ ok ] Starting database: mongodb apparently already running.
...:~$ sudo service mongodb stop
[ ok ] Stopping database: mongodb.
答案 0 :(得分:0)
不幸的是,我无法解决service mongod start on debian doesnt work的答案是否解决了这个问题,或者是否只是我首先停止了服务器。
停止mongod和mongodb服务,然后更新和升级后,事情进展顺利,没有错误。我注意到的一件事是我正在运行" mongodb"服务,但不是" mongod"我收到错误后服务。成功更新/升级后,apt-get启动了" mongod"服务。
因此,我建议如果您遇到此错误,请手动停止数据库,然后让更新程序使用它们。我现在工作正常。