Reputation: 349
We are trying to install libmysqlclient-dev
and used this command:
sudo apt-get install libmysqlclient-dev -y
We got the following error :
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libmysqlclient21
The following NEW packages will be installed:
libmysqlclient-dev libmysqlclient21
0 upgraded, 2 newly installed, 0 to remove and 12 not upgraded.
Need to get 2,892 kB of archives.
After this operation, 17.8 MB of additional disk space will be used.
Ign:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libmysqlclient21 amd64 8.0.28-0ubuntu0.20.04.3
Err:1 http://security.ubuntu.com/ubuntu focal-updates/main amd64 libmysqlclient21 amd64 8.0.28-0ubuntu0.20.04.3
404 Not Found [IP: 185.125.190.36 80]
Ign:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libmysqlclient-dev amd64 8.0.28-0ubuntu0.20.04.3
Err:2 http://security.ubuntu.com/ubuntu focal-updates/main amd64 libmysqlclient-dev amd64 8.0.28-0ubuntu0.20.04.3
404 Not Found [IP: 185.125.190.36 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-8.0/libmysqlclient21_8.0.28-0ubuntu0.20.04.3_amd64.deb 404 Not Found [IP: 185.125.190.36 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-8.0/libmysqlclient-dev_8.0.28-0ubuntu0.20.04.3_amd64.deb 404 Not Found [IP: 185.125.190.36 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
We used both apt-get update
and the --fix-missing
option. We got the same error.
We then listed the available versions using sudo apt-cache policy libmysqlclient-dev
:
we got:
libmysqlclient-dev:
Installed: (none)
Candidate: 8.0.28-0ubuntu0.20.04.3
Version table:
8.0.28-0ubuntu0.20.04.3 500
500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
8.0.19-0ubuntu5 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
We went to http://security.ubuntu.com/ubuntu/pool/main/m/mysql-8.0/
:
We got the version of linux using lsb_release -a
:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
We then tried to force install the available version using sudo apt-get install libmysqlclient-dev=8.0.28-0ubuntu0.20.04.4 -y
:
We got :
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '8.0.28-0ubuntu0.20.04.4' for 'libmysqlclient-dev' was not found
How do we get this package installed?
Upvotes: 0
Views: 551
Reputation: 1533
try:
1] edit your /etc/apt/sources.list
2] comment or delete all content
3] paste this
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
#
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
#
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
#
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
#
deb http://archive.canonical.com/ubuntu focal partner
deb-src http://archive.canonical.com/ubuntu focal partner
they are official packages of focal. I hope it works!
Upvotes: 1