Unable to install mongodb on linux

2019-08-09 11:13发布

I am using sudo apt-get install mongodb command but it is giving me error , i think there is problem with packaging but i am unable to find it.

mongodb start/running, process 15259
Can't exec "/sbin/insserv": No such file or directory at /usr/sbin/update-rc.d line 382.
update-rc.d: error: insserv rejected the script header
No apport report written because the error message indicates its a followup error from a previous failure.
                          dpkg: error processing package mongodb-server (--configure):
 subprocess installed post-installation script returned error exit status 255
dpkg: dependency problems prevent configuration of mongodb:
 mongodb depends on mongodb-server (>= 1:2.4.1-2); however:
  Package mongodb-server is not configured yet.

dpkg: error processing package mongodb (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.19-0ubuntu6) ...
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 postfix
 mongodb-server
 mongodb
E: Sub-process /usr/bin/dpkg returned an error code (1)

标签: linux mongodb
3条回答
Melony?
2楼-- · 2019-08-09 11:38

With version 3.0 MongoDB has split the package into parts. E.g. you may install just mongo shell. Take a look at this article.

查看更多
Fickle 薄情
3楼-- · 2019-08-09 11:51

This was some time back. I have mongo working OK

Un install anything you have NOW ... There is a default Mongo comes with Ubuntu.

Visit the Ubuntu Mongo-shell installation.

The other Install-s appear to depend on the shell install. I find that refreshing actually. I wish real databases(tm) would pay attention. Things USED-TO work like that. All the time. Wow.

The other useful tidbits are ...

  1. stop
  2. restart
  3. start

And

  1. configuration.
    • file: /etc/mongod.conf
    • see also: /etc/init.d/README file.

A very useful engine ... w

查看更多
倾城 Initia
4楼-- · 2019-08-09 11:51

You can try this

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

sudo apt-get update

sudo apt-get install -y mongodb-org

more details https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/

查看更多
登录 后发表回答