我在 Ubuntu 上尝试安装 mysql 时出现此错误
sudo apt install mysql-client-core-5.7
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libnvidia-common-390 libwayland-client0:i386 libwayland-server0:i386 Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed: mysql-client-core-5.7 0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded. Need to get 6,985 kB of archives. After this operation, 31.5 MB of additional disk space will be used. Ign:1 http://security.ubuntu.com/ubuntu bionic-security/main amd64 mysql-client-core-5.7 amd64
5.7.23-0ubuntu0.18.04.1 Err:1 http://us.archive.ubuntu.com/ubuntu bionic-security/main amd64 mysql-client-core-5.7 amd64
5.7.23-0ubuntu0.18.04.1 404 Not Found [IP: 91.189.88.161 80] E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.7/mysql-client-core-5.7_5.7.23-0ubuntu0.18.04.1_amd64.deb 404 Not Found [IP: 91.189.88.161 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
我努力了
sudo apt update
其次是
sudo apt upgrade
我的 sources.list 文件如下所示
# deb cdrom:[Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725)]/ bionic main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
先谢谢您的帮助。
我刚刚尝试了自动删除,然后更新和升级,当我再次使用--fix-missing 运行时,我得到了以下结果
sudo apt-get install mysql-client-core-5.7 --fix-missing
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libaio1
The following NEW packages will be installed:
libaio1 mysql-client-core-5.7
0 upgraded, 2 newly installed, 0 to remove and 5 not upgraded.
Need to get 6,985 kB/6,992 kB of archives.
After this operation, 31.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Ign:1 http://security.ubuntu.com/ubuntu bionic-security/main amd64 mysql-client-core-5.7 amd64 5.7.23-0ubuntu0.18.04.1
Err:1 http://us.archive.ubuntu.com/ubuntu bionic-security/main amd64 mysql-client-core-5.7 amd64 5.7.23-0ubuntu0.18.04.1
404 Not Found [IP: 91.189.88.152 80]
Selecting previously unselected package libaio1:amd64.
(Reading database ... 212399 files and directories currently installed.)
Preparing to unpack .../libaio1_0.3.110-5_amd64.deb ...
Unpacking libaio1:amd64 (0.3.110-5) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up libaio1:amd64 (0.3.110-5) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.7/mysql-client-core-5.7_5.7.23-0ubuntu0.18.04.1_amd64.deb 404 Not Found [IP: 91.189.88.152 80]
答案1
尝试这个sudo apt install mysql-client
如果我没记错的话,这还会安装一些依赖项。 就是mysql-client-core-5.7
其中之一。
我希望这能帮助你解决问题。
答案2
我有同样的问题,解决方案是删除与 mariadb 相关的存储库源,然后我清除 mysql 和所有相关包,重新加载源,重新启动并重新安装 mysql 并且它起作用了 !!!!