The following packages have unmet dependencies: mongodb-org-mongos : Depends: libssl1.1 (>= 1.1.1) but it is not installable mongodb-org-server : Depends: libssl1.1 (>= 1.1.1) but it is not installable E: Unable to correct problems, you have held broken packages.
Asked
Active
Viewed 274 times
1 Answers
0
I've not dug deep enough to find the reason behind the missing libssl1.1 library, but it seems the LTS 22.04 isn't including it (also seems to affect some older versions).
I wrote the following script for my systems to have it installed, as one of the tools I use to setup the system requires it.
Hope others find this useful.
# Find the most recent 1.1 libssl package in the ubuntu archives
BASE_URL='http://archive.ubuntu.com/ubuntu/pool/main/o/openssl'
FILE="$( # The get parameters in the URL sort the results by descending chronological order
curl -s "${BASE_URL}/?C=M;O=D" $(\
# Make sure all tags are on separate lines - makes grep-work later easier \
) | tr '>' '>\n' $(\
# extract all the unique links on the page \
) | grep 'href' | sed 's/^.*href="\([^"]*\)".*$/\1/p' | awk '!a[$0]++' $(\
# pick the most relevant items on the list (libssl 1.1 for amd64 arch) \
) | grep "libssl" | grep "1.1_" | grep "amd64.deb" $(\
# choose only the last one \
) | tail -1 )"
# Grab the file and if download was successful, install it with sudo
wget "${URL_BASE}/${FILE}" && sudo dpkg -i "./${FILE}"

Lockszmith
- 2,173
- 1
- 29
- 43