Linux:apt-get无法获取FailReason:ConnectionRefused
时间:2020-02-23 14:44:20 来源:igfitidea点击:
尝试使用apt-get更新您的Debian发行版时遇到以下问题?
# apt-get update Ign:1 http://deb.debian.org/debian stretch InRelease Hit:2 http://deb.debian.org/debian stretch Release Ign:3 http://repo.r1soft.com/apt stable InRelease Hit:4 http://repo.r1soft.com/apt stable Release Hit:5 http://security.debian.org/debian-security stretch/updates InRelease Ign:8 https://download.webmin.com/download/repository sarge InRelease Hit:9 https://download.webmin.com/download/repository sarge Release Err:11 https://packages.sury.org/php stretch InRelease FailReason: ConnectionRefused Reading package lists… Done W: Failed to fetch https://packages.sury.org/php/dists/stretch/InRelease FailReason: ConnectionRefused W: Some index files failed to download. They have been ignored, or old ones used instead.
在这种情况下,该apt仓库(packages.sury.org)上的pgp密钥被吊销/更改。
要解决此问题,您需要下载新密钥并按如下所示导入它:
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
这应该可以解决问题,您可以再次发出" apt-get update"命令进行测试。