When I'm Trying to Run the Following command on Ubuntu 20 :

apt-get update
apt install mysql-server libmysqlclient20

I get the following error :

E: Package 'libmysqlclient20' has no installation candidate

the process is part of running some application and when i try to run the application (regardless to the error) it says :

 libmysqlclient.so.20: cannot open shared object file: No such file or directory

Any Help ?!


  • Which application says about "libmysqlclient.so.20"? – N0rbert Aug 6 '20 at 20:24
  • it an application called mcsql , after i check the libmysqlclient i found file under the name of "libmysqlclient.so.21.1.21" i tried to make soft link called "libmysqlclient.so.20" in the same directory ,but that didn't work . is there a way to manually install the "libmysqlclient.so.20" ? – Colin Jack Aug 7 '20 at 21:15

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

sudo apt-get install libmysqlclient-dev

and it will pull correct dependency.

  • 1
    hi , still not working it says that the latest version is installed ! and when try to run the application it says " libmysqlclient.so.20: cannot open shared object file: No such file or directory" – Colin Jack Aug 6 '20 at 17:46

Solved by getting the file "libmysqlclient20" manually and then place it in "/usr/lib/x86_64-linux-gnu/"



Just download libmysqlclient20 package from 18.04 and install it https://packages.ubuntu.com/bionic/amd64/libmysqlclient20/download download link is in (security.ubuntu.com/ubuntu)


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.