[SERVER-52937] mongodb-org 4.2.11 debian package is failing to install Created: 18/Nov/20  Updated: 15/Mar/21  Resolved: 15/Mar/21

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

Type: Bug Priority: Major - P3
Reporter: Chi Leung Assignee: Eric Sedor
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-52806 deb install files assume systemd Closed
Problem/Incident
is caused by SERVER-46342 DEB installs of MDB do not issue syst... Closed
Operating System: ALL
Steps To Reproduce:

docker run --rm -ti debian bash
apt-get update
apt install -y wget gnupg
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add -
apt-get update --allow-releaseinfo-change && apt-get install -y lsb-release
echo "deb http://repo.mongodb.org/apt/debian "$(lsb_release -sc)"/mongodb-org/4.2 main" | tee /etc/apt/sources.list.d/mongodb.list
apt-get update && apt-get install -y mongodb-org
 

Participants:

 Description   

Installing mongodb-org is now failing on debian when it was working in the previous patch version 4.2.10 with the following error:

/var/lib/dpkg/info/mongodb-org-server.postinst: 43: /var/lib/dpkg/info/mongodb-org-server.postinst: systemctl: not found
dpkg: error processing package mongodb-org-server (--configure):
 installed mongodb-org-server package post-installation script subprocess returned error exit status 127
Setting up mongodb-org-shell (4.2.11) ...
Setting up mongodb-org-mongos (4.2.11) ...
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 libc-bin (2.28-10) ...
Errors were encountered while processing:
 mongodb-org-server
 mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)

 



 Comments   
Comment by Eric Sedor [ 15/Mar/21 ]

Hi,

We haven’t heard back from you for some time, so I’m going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket.

Regards,
Eric

Comment by Daniel Moody [ 19/Nov/20 ]

Hello chiting.leung@gmail.com, in this version 4.2.11, we have backported the ticket: https://jira.mongodb.org/browse/SERVER-46342 which adds the systemd command from master branch, however, for older systems which do not have systemd this will fail. This has recently been reverted from older branches, but exists in 4.2.11. It should be working for non-systemd in the next released version.

We have a ticket: https://jira.mongodb.org/browse/SERVER-52806 to fix the issue and backport it to older versions so that both systemd and non-systemd systems can be supported correctly.

In the meantime, if you can not wait for 4.2.12, and need 4.2.11 now, it may be possible to apply a workaround to temporarily create a fake systemctl command on a nonsystemd system: 

sudo touch /bin/systemctl
sudo chmod +x /bin/systemctl

now install the package, then remove the fake systemctl:

sudo rm /bin/systemctl

For non-systemd system, this command is not needed and does not change the installation.

Comment by Chi Leung [ 18/Nov/20 ]

Sorry, I might have chosen the wrong priority level.

 

Additionally, I managed to install the previous version using

apt-get install -y mongodb-org=4.2.10  mongodb-org-mongos=4.2.10 mongodb-org-server=4.2.10 mongodb-org-shell=4.2.10 mongodb-org-tools=4.2.10

Generated at Thu Feb 08 05:29:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.