我正在尝试使用终端将 mongodb 3.2 安装到 codio 中,并且我正在按照他们网站上的指南进行操作。(我是 mongodb 和 nosql 的新手)
我到了第 4 步,使用以下命令安装 mongodb:
sudo apt-get install -y mongodb-org
最后得到以下信息:
..
The following packages will be upgraded:
mongodb-org
1 upgraded, 0 newly installed, 0 to remove and 51 not upgraded.
2 not fully installed or removed.
Need to get 3,554 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://repo.mongodb.org/apt/ubuntu/ trusty/mongodb-org/3.2/multiverse mongodb-org amd64 3.2.2 [3,554 B]
Fetched 3,554 B in 0s (249 kB/s)
(Reading database ... 37250 files and directories currently installed.)
Preparing to unpack .../mongodb-org_3.2.2_amd64.deb ...
Unpacking mongodb-org (3.2.2) over (3.2.1) ...
Setting up mongodb-org-server (3.2.2) ...
start: Job failed to start
invoke-rc.d: initscript mongod, action "start" failed.
dpkg: error processing package 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 package 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)
然后我跑
sudo 服务 mongod 开始
或者
sudo 服务 mongodb 启动
两个命令都将响应start: Job failed to start
或mongodb: unrecognized service
我是否在这里遗漏了一些东西,例如 mongodb 需要安装其他软件包?跟随错误的指南版本?我需要创建配置文件吗?如果我怎么做?因为它没有创建一个,或者 mongodb 不能使用内置终端在 codio 上工作?mongodb-org-server 是否已安装或正在运行?我一直在寻找确切或类似的东西,也尝试了不同的命令但没有运气。