[SERVER-21812] MongoDB 3.2 install fails on Ubuntu 14.04: invoke-rc.d: unknown initscript, /etc/init.d/mongod not found. Created: 09/Dec/15  Updated: 09/Dec/15  Resolved: 09/Dec/15

Status: Closed
Project: Core Server
Component/s: Packaging
Affects Version/s: 3.2.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Pascal Hofmann Assignee: Sam Kleinman (Inactive)
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 14.04 LTS (trusty)


Operating System: Linux
Steps To Reproduce:

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 && \
echo 'deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse' > /etc/apt/sources.list.d/mongodb.list && \
apt-get update && \
apt-get install -yq mongodb-org

Participants:

 Description   

MongoDB 3.2 install fails on Ubuntu 14.04:

Setting up mongodb-org-server (3.2.0) ...
Adding system user `mongodb' (UID 102) ...
Adding new user `mongodb' (UID 102) with group `nogroup' ...
Not creating home directory `/home/mongodb'.
Adding group `mongodb' (GID 105) ...
Done.
Adding user `mongodb' to group `mongodb' ...
Adding user mongodb to group mongodb
Done.
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.2.0) ...
Setting up mongodb-org-tools (3.2.0) ...
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)



 Comments   
Comment by Ramon Fernandez Marina [ 09/Dec/15 ]

Thanks for the followup Pascal, and for the recipe for Docker. Closing ticket.

Regards,
Ramón.

Comment by Pascal Hofmann [ 09/Dec/15 ]

I forgot one important detail: I tried installing inside a Docker container with an ubuntu 14.04 base image. Cause for the problem is the way docker messes up the init system. I was able to install using the following commands. So this ticket can be closed.

RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -s /bin/true /sbin/initctl
RUN dpkg-divert --local --rename --add /etc/init.d/mongod
RUN ln -s /bin/true /etc/init.d/mongod

RUN \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 && \
echo 'deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse' > /etc/apt/sources.list.d/mongodb.list && \
apt-get update && \
apt-get install -yq mongodb-org

Comment by Ramon Fernandez Marina [ 09/Dec/15 ]

I'm not able to reproduce this error. I'm wondering if there may be any leftover links from a previous install, can you please run:

find /etc -name "*mongod*"

and post the results?

Thanks,
Ramón.

Generated at Thu Feb 08 03:58:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.