我无法在我的服务器上安装mongodb(ssh; linux-gnu)。获取以下跟踪:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mongodb-org-mongos mongodb-org-server mongodb-org-tools
The following NEW packages will be installed:
mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-tools
0 upgraded, 4 newly installed, 0 to remove and 47 not upgraded.
Need to get 0 B/46.7 MB of archives.
After this operation, 149 MB of additional disk space will be used.
Selecting previously deselected package mongodb-org-server.
(Reading database ... 73280 files and directories currently installed.)
Unpacking mongodb-org-server (from .../mongodb-org-server_3.0.5_amd64.deb) ...
Selecting previously deselected package mongodb-org-mongos.
Unpacking mongodb-org-mongos (from .../mongodb-org-mongos_3.0.5_amd64.deb) ...
Selecting previously deselected package mongodb-org-tools.
Unpacking mongodb-org-tools (from .../mongodb-org-tools_3.0.5_amd64.deb) ...
Selecting previously deselected package mongodb-org.
Unpacking mongodb-org (from .../mongodb-org_3.0.5_amd64.deb) ...
Processing triggers for man-db ...
Setting up mongodb-org-server (3.0.5) ...
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
Setting up mongodb-org-mongos (3.0.5) ...
configured to not write apport reports
Setting up mongodb-org-tools (3.0.5) ...
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
configured to not write apport reports
Errors were encountered while processing:
mongodb-org-server
mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)
我一直在关注official documentation的说明。
我尝试repair it,但它没有帮助。
mongod --repair
2015-08-03T09:11:28.456+0200 I STORAGE [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
2015-08-03T09:11:28.456+0200 I CONTROL [initandlisten] dbexit: rc: 100
我也试图install locales,但它也没有帮助。
我如何解决这个问题并安装mongodb?可能是什么错误?
答案 0 :(得分:0)
在Yosemite上成功安装MongoDB(通过Homebrew)后,显示了以下说明:
To have launchd start mongodb at login:
ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
Then to load mongodb now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
Or, if you don't want/need launchctl, you can just run:
mongod --config /usr/local/etc/mongod.conf
" /usr/local/etc/mongod.conf "包含" dbpath "论点。在查看该文件后,我还能够按如下方式启动MongoDB:
$ mongod --dbpath / usr / local / var / mongodb
在Linux环境中,您的路径可能不同,但我希望这有助于回答您的问题并为您提供解决问题的方向。