GPG公钥在这里不正确。需要重新安装最新的GPG公钥。
请尝试。
# apt-key adv --keyserver pgp.mit.edu --recv-keys 467B942D3A79BD29
它将在服务器上安装正确的MySQL-server GPG密钥,然后添加MySQL服务器的存储库。
适用于Ubuntu 22.04(Jammy)。
# echo "deb https://repo.mysql.com/apt/ubuntu/ jammy mysql-apt-config
deb https://repo.mysql.com/apt/ubuntu/ jammy mysql-8.0
deb https://repo.mysql.com/apt/ubuntu/ jammy mysql-tools
deb https://repo.mysql.com/apt/ubuntu/ jammy mysql-cluster-8.0
deb-src https://repo.mysql.com/apt/ubuntu/ jammy mysql-8.0" | sudo tee /etc/apt/sources.list.d/mysql-8.0.list
对于Ubuntu 20.04(Focal):
# echo "deb https://repo.mysql.com/apt/ubuntu/ focal mysql-apt-config
deb https://repo.mysql.com/apt/ubuntu/ focal mysql-8.0
deb https://repo.mysql.com/apt/ubuntu/ focal mysql-tools
deb https://repo.mysql.com/apt/ubuntu/ focal mysql-cluster-8.0
deb-src https://repo.mysql.com/apt/ubuntu/ focal mysql-8.0" | sudo tee /etc/apt/sources.list.d/mysql-8.0.list
对于Ubuntu 18.04(Bionic):
# echo "deb https://repo.mysql.com/apt/ubuntu/ bionic mysql-apt-config
deb https://repo.mysql.com/apt/ubuntu/ bionic mysql-8.0
deb https://repo.mysql.com/apt/ubuntu/ bionic mysql-tools
deb https://repo.mysql.com/apt/ubuntu/ bionic mysql-cluster-8.0
deb-src https://repo.mysql.com/apt/ubuntu/ bionic mysql-8.0" | sudo tee /etc/apt/sources.list.d/mysql-8.0.list
对于Ubuntu 16.04(Xenial):
# echo "deb https://repo.mysql.com/apt/ubuntu/ xenial mysql-apt-config
deb https://repo.mysql.com/apt/ubuntu/ xenial mysql-8.0
deb https://repo.mysql.com/apt/ubuntu/ xenial mysql-tools
deb https://repo.mysql.com/apt/ubuntu/ xenial mysql-cluster-8.0
deb-src https://repo.mysql.com/apt/ubuntu/ xenial mysql-8.0" | sudo tee /etc/apt/sources.list.d/mysql-8.0.list
然后运行
# apt update
# apt install mysql-server
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <expired-key>
这个命令对我有效。太好了!谢谢。 - Abhi$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29
执行中:/tmp/apt-key-gpghome.eEd2EYwMwm/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 gpg: 密钥服务器接收失败:服务器指示失败。 - kuri