![APT 根本无法工作:“E:值‘jessie’对于 APT::Default-Release 无效,因为此类版本在源中不可用”](https://linux22.com/image/918165/APT%20%E6%A0%B9%E6%9C%AC%E6%97%A0%E6%B3%95%E5%B7%A5%E4%BD%9C%EF%BC%9A%E2%80%9CE%EF%BC%9A%E5%80%BC%E2%80%98jessie%E2%80%99%E5%AF%B9%E4%BA%8E%20APT%3A%3ADefault-Release%20%E6%97%A0%E6%95%88%EF%BC%8C%E5%9B%A0%E4%B8%BA%E6%AD%A4%E7%B1%BB%E7%89%88%E6%9C%AC%E5%9C%A8%E6%BA%90%E4%B8%AD%E4%B8%8D%E5%8F%AF%E7%94%A8%E2%80%9D.png)
我正在尝试运行该命令sudo apt-get install ssh
,但是当我运行它时出现此错误。
$ sudo apt-get install ssh
Reading package lists... Done
E: The value 'jessie' is invalid for APT::Default-Release as such a release is not available in the sources
当我尝试apt update
修复它时,我得到了这个。
$ sudo apt update
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:2 http://ca.archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://ca.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://ca.archive.ubuntu.com/ubuntu bionic-backports InRelease
Ign:5 http://cdn-fastly.deb.debian.org/debian jessie-backports InRelease
Ign:6 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Err:7 http://cdn-fastly.deb.debian.org/debian jessie-backports Release
404 Not Found [IP: 151.101.124.204 80]
Get:8 http://cdn-fastly.deb.debian.org/debian stretch Release [118 kB]
Get:9 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg [2,365 B]
Ign:9 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg
Reading package lists... Done
E: The repository 'http://httpredir.debian.org/debian jessie-backports Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://cdn-fastly.deb.debian.org/debian stretch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7638D0442B90D010 NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY EF0F382A1A7B6500
E: The repository 'http://httpredir.debian.org/debian stretch Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The value 'jessie' is invalid for APT::Default-Release as such a release is not available in the sources
有人遇到过这种情况吗?有没有办法清除 apt 依赖项并重新开始?
答案1
我注意到一个文件/etc/apt.conf.d/10apt
里有一些东西jessie
,结果导致了我的问题。删除该文件解决了这个问题。