1

I can't install mongodb on 14.04.5 LTS, Trusty Tahr. I've tried several times but nothing helps! :(

Following this documentation

1.

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5

Result:

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.PWO8RTLTt2 --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/fkrull-deadsnakes.gpg --keyring /etc/apt/trusted.gpg.d/git-core-ppa.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
gpg: requesting key 91FA4AD5 from hkp server keyserver.ubuntu.com
gpg: key 91FA4AD5: public key "MongoDB 3.6 Release Signing Key <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)`

2.

$ echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list

Result:

deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.6 multiverse`

3.

$ sudo apt-get update

Output has no errors.

4.

$ sudo apt-get install -y mongodb-org

Result:

...
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
dpkg: error processing package mongodb-org-server (--configure):
 subprocess installed post-installation script returned error exit status 100
Setting up mongodb-org-mongos (3.6.2) ...
Setting up mongodb-org-tools (3.6.2) ...
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
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 mongodb-org-server
 mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)`

And there's nothing I can do about it.


Also I've tried to reinstall by this command:

$ sudo apt-get --reinstall install mongodb

But even this doesn't help.

Result:

Removing mongodb-org-server (3.6.2) ...
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
dpkg: error processing package mongodb-org-server (--remove):
 subprocess installed pre-removal script returned error exit status 100
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 100
Removing mongodb-org-mongos (3.6.2) ...
Removing mongodb-org-shell (3.6.2) ...
Removing mongodb-org-tools (3.6.2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
 mongodb-org-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

What's happening?

1 Answer 1

2

The Upstart task description file /etc/init.d/mongod seems to be missing. Since the package is about to be removed anyway you can (probably) simply provide an empty description as a placeholder to complete the package removal:

sudo touch /etc/init.d/mongod
sudo apt install -f
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .