xxxxxxxxxx
echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list
sudo apt-get update
sudo apt-get install libssl1.1
sudo rm /etc/apt/sources.list.d/focal-security.list
# Or
#Download libssl1.1_1.1.1f-1ubuntu2_amd64.deb from official repository:
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
#Install it:
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
#Proceed with the installation of MongoDB:
sudo apt-get install -y mongodb-org
xxxxxxxxxx
# in this part I thought it better to use the add-apt-key tool
sudo apt-get install add-apt-key
sudo su -
add-apt-key --keyserver keyserver.ubuntu.com < the key that appeared in the error >
exit
sudo apt update && apt-cache policy libssl1.0-dev
sudo apt-get install libssl1.0-dev