3

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 ?!

Regards

3
  • Which application says about "libmysqlclient.so.20"?
    – N0rbert
    Aug 6, 2020 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, 2020 at 21:15
  • the one that works for me was the answer from Abraham below: askubuntu.com/a/1368646/1742711
    – kevin
    Nov 1, 2023 at 3:30

5 Answers 5

5

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

sudo apt-get install libmysqlclient-dev

and it will pull correct dependency.

1
  • 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, 2020 at 17:46
4

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
2

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
0

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

Regards

0

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)

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .