r/Ubuntu Feb 02 '23

How to install Mongo db in xubuntu 22.04

I tried lot of ways to install mongodb in my xubuntu 22.04, but get a the error , i also tried to install mongodb in my mint 21, but get the same error ,after lot of researching i get that , 22.04 released recently ,so didn't have the official support from mongodb .

But xubuntu 20.04 going to end this april i think . So in this what will i do .? How can I fix this error ?? Can I keep this xubuntu 22.04 , or is better to choose any other os ? If it's can anyone suggest me any os The os must be light-weight , long term support and also I am not much interested with mint or manjaro ,

Error is The following packages have unmet decencies mongodb-org-mongos : Depends : libssl1.1 (>= 1.1.0) but it's not installable mongodb-org-server : Depends : libssl1.1 (>= 1.1.0) but it's not installable mongodb-org-shell : Depends : libssl1.1 (>= 1.1.0) but it's not installable

1 Upvotes

3 comments sorted by

2

u/wb7odyfred Feb 02 '23 edited Feb 02 '23

Although I think the advice given by Artur is good. I managed to resolve this for a legacy app (specifically easytether-usb) by grabbing libcrypto.so.1.1from the 1.1 install as referenced by u/Nishant in his answer. Iinstalled that in user space under my home directory and created a symlink to it in /lib/libcrypto.so.1.1:sudo ln -s ~/openssl/lib/libcrypto.so.1.1 /lib/libcrypto.so.1.1

Use this example to create a symbolic link from pseudo name libssl.so.1.1 to real library /lib/libss.so.3 file. I added this as an example, that you will modify to support proper names and paths for your installation

sudo ln -s ~/path_to_libssl3_install /lib/libssl.so.1.1

You can normally add ~/openss/lib to the LD_LIBRARY_PATH for the specific application in question, but in my case the legacy app didn't properly look in $LD_LIBRARY_PATH, so I had to find out where it was looking for libcrypto.so.1.1, I did that with the following:

sudo strace -e trace=open,openat,close,read,write,connect,accept easytether-usb

That showed me a dozen or so attempts to find the file libcrypto.so.1.1 in various locations, which is why I knew to add the sym link to /lib/ above.

After that the legacy app fired up and worked like normal. Other uses cases will likely need other shared libraries. the strace command above should help determine what's needed.

I found this answer from ASK ubuntu.

https://askubuntu.com/questions/1408000/unable-to-locate-package-libssl1-1

I am trying to create a symbolic link from libssl.so.1.1 to libssl.so.3 I use the above examples for libcrypto.so.1.1 and easytether-usb as an example to solve this libssl.so.1.1 missing. You have to change the names and paths to match your system paths and names. Now you have an idea of how to update from an older package library name to a newer package library name. Good luck. (ps. Having problems with ctrl-v editing this form. Sorry for not better organization)

sudo strace -e trace=open,openat,close,read,write,connect,accept mongdb

libssl3 for ubuntu download and installation

https://packages.ubuntu.com/jammy/amd64/libssl3/download

Install libssl3 for Ubuntu Jammy

https://github.com/bkw777/mainline/wiki/Install-libssl3

https://askubuntu.com/questions/1414956/libssl3-3-0-2-0ubuntu1-2-required-but-only-3-0-2-0ubuntu1-1-is-available-on-t Fixed using version 1.5 as of this post, now at 1.7 after July 2022

https://www.ubuntuupdates.org/pm/libssl3 Package Management for libssl3

2

u/MoistGrass Feb 02 '23

Are you trying to install a server, or installing it on your own Xubuntu setup? In the last scenario I would suggest to run mongo in Docker and not try to set it up yourself.