problem while installing libmysqlclient20 on Ubuntu 20

You have to install its development version (with headers) by

sudo apt-get install libmysqlclient-dev

and it will pull correct dependency.


Ubuntu 20 replaced libmysqlclient20 with libmysqlclient21, but you can still get the old version by adding an earlier Ubuntu version's repository to your apt sources, then using apt install:

echo 'deb http://security.ubuntu.com/ubuntu xenial-security main' | sudo tee /etc/apt/sources.list.d/xenial-security.list
sudo apt update
sudo apt install libmysqlclient20

The solution from JellicleCat fixed it for me. Specially if you are coming from trying to get your RAILS application to work and deploy again.

echo 'deb http://security.ubuntu.com/ubuntu xenial-security main' | sudo tee /etc/apt/sources.list.d/xenial-security.list
sudo apt update
sudo apt install libmysqlclient20