错误

执行sudo apt-get upgrade出现以下错误:

E: The value '\stable' is invalid for APT::Default-Release as such a release is not available in the sources

//或者

E: 'stable' 这个值对 APT::Default-Release 是无效的,因为在源里找不到这样的发行

解决方法

root@sever:~# sudo grep -ri stable /etc
/etc/bind/named.conf.options:   // If your ISP provided one or more IP addresses for stable 
/etc/fail2ban/filter.d/nginx-limit-req.conf:# Shortly, much faster and stable version of regexp:
/etc/staff-group-for-usr-local:release wheezy+1 as stable, all packages that need it check that this
匹配到二进制文件 /etc/apt/trusted.gpg.d/debian-archive-stretch-stable.gpg
匹配到二进制文件 /etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg
匹配到二进制文件 /etc/apt/trusted.gpg.d/debian-archive-buster-stable.gpg
/etc/apt/apt.conf.d/00local:APT::Default-Release "stable";

编辑最后一行的文件

root@sever:~# vim /etc/apt/apt.conf.d/00local

将stable修改为对应版本,版本查询:

root@sever:~# cat /etc/issue

修改完保存退出

Last modification:September 8, 2019
如果觉得我的文章对你有用,请随意赞赏