[SERVER-41049] MongoDB 4.0.9 won't install on Ubuntu 19.04 Created: 08/May/19  Updated: 27/Oct/23  Resolved: 23/May/19

Status: Closed
Project: Core Server
Component/s: Build, Packaging, Upgrade/Downgrade
Affects Version/s: 4.0.9
Fix Version/s: None

Type: Question Priority: Minor - P4
Reporter: Jim Blackhurst Assignee: Mathew Robinson (Inactive)
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

I know that Ubuntu 19.04 is not listed in the supported platforms and that only LTS versions of Ubuntu are, but I upgraded my laptop and found that I could no longer install or run MongoDB.  I mention this only in case it was not already known.

 

jim@jimbuntu:~$ sudo apt-get install -y mongodb-enterprise-server
[sudo] password for jim: 
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:The following packages have unmet dependencies.
mongodb-enterprise-server : Depends: libsensors4 (>= 1:3.0.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
jim@jimbuntu:~$

 

 

running mongod from a tarball installation gives:

jim@jimbuntu:~$ mongod
mongod: error while loading shared libraries: libsensors.so.4: cannot open shared object file: No such file or directory

 

Let me know if you need any more information.

 



 Comments   
Comment by Mathew Robinson (Inactive) [ 23/May/19 ]

I have verified this and don't think we can do anything about it. The 18.04 builds are not guaranteed to run on 19.04.

I started to do some digging and found that we're linking into libsensors as a dependency of libsnmp (of which we statically link the system version). You can see this from the following compile command (note the -lsensors):

build/cached/third_party/gperftools-2.7/libtcmalloc_minimal.a -Wl,--no-whole-archive build/cached/mongo/util/libdebugger.a -Wl,--whole-archive build/cached/mongo/libboost_assert_shim.a -Wl,--no-whole-archive -Wl,--end-group -lnetsnmpmibs -lsensors -lpci -ldl -lnetsnmpagent -lwrap -lnetsnmp -lcrypto -lm -lldap -llber -lsasl2 -lgssapi_krb5 -lsasl2 -lcurl -lm -lresolv -lcrypto -lssl -lcrypto -ldl -lrt -ldl

These flags come from the net-snmp-config command we run in the enterprise build. Running on an Ubuntu 18.04 host we get:

root@9764228b0c2f:/# net-snmp-config --agent-libs
-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -L/usr/lib/x86_64-linux-gnu -lnetsnmpmibs -lsensors -lpci -ldl -lnetsnmpagent -lwrap -Wl,-E -lnetsnmp -lcrypto -lm
root@9764228b0c2f:/# 

In Ubuntu 19.04 they upgraded to libsensors 5 so the old libsensors4.so is no longer there. If you build enterprise on Ubuntu 19.04 it links to the new libsensors correctly. So the only way for us to fix this would be to start releasing Ubuntu 19.04 packages, which we're unlikely to do given it's not an LTS release.

Generated at Thu Feb 08 04:56:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.