Unable to install libssl1.0.0:i386 due to "unmet dependencies"?

I am using Ubuntu 20.04, below steps work for me:

Add 18.04's main repository using

echo "deb http://security.ubuntu.com/ubuntu bionic-security main" | sudo tee -a /etc/apt/sources.list.d/bionic.list

Update repository cache and check if libssl1.0-dev is now available.

sudo apt update
apt-cache policy libssl1.0-dev

Install libssl1.0-dev.

sudo apt-get install libssl1.0-dev 

This kind of error message usually indicates that a package is being installed that conflicts with other installed packages and would have forced removal of other dependent packages. When installing the same package for more than one architecture at the same time (see MultiArch), amd64 and i386 in this case, the versions of the packages to be installed must match exactly.

What likely happened in this case (confirmed by our discussion in the comments) is that libssl1.0.0 was upgraded to a PPA version that is newer than any version available from the Ubuntu repositories. If the PPA was later disabled or unconfigured, the newer packages normally remain installed. Read this question for the difference between disabling and purging a PPA. However, if you've already removed the PPA from your apt configuration, you'll need to manually downgrade the packages that were previously upgraded from the PPA.

To be able to install libssl1.0.0:i386, you must have the same version of libssl1.0.0:amd64 installed from the repository. And because the openssl source package builds multiple related binary packages, you have to ensure that all of its packages are also on the same version. If you don't specify all packages you want to downgrade, apt will prefer to uninstall rather than downgrade. In this case, if you have libssl1.0.0, libssl-dev, and openssl installed from a PPA, you should

sudo apt-get install libssl1.0.0/trusty libssl-dev/trusty openssl/trusty

Answer yes to apt-get's prompt about downgrading the packages. You should now be able to install the libssl1.0.0:i386 package from the repository.


This is because the web socket library is not installed. Try running

sudo apt-get install libwebsockets-dev

before running

sudo apt-get install mosquitto