今天更新debian 10的源的时候,突然报错,主要是说源从稳定源切换到不稳定源,连忙查了一下原因。

'Suite' value from 'stable' to 'oldstable'

root@debian:# apt-get update
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:4 http://nginx.org/packages/mainline/debian buster InRelease [3604 B]
Get:5 http://nginx.org/packages/mainline/debian buster/nginx amd64 Packages [46.3 kB]
Reading package lists... Done
E: Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
N: Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Version' value from '10.9' to '10.10'
E: Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
E: Repository 'http://deb.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details. 

还好,运行下面的命令成功解决。

apt-get --allow-releaseinfo-change update

再次更新源,如下:

root@debian:# apt-get --allow-releaseinfo-change update
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Hit:4 http://nginx.org/packages/mainline/debian buster InRelease
Reading package lists... Done
root@debian:# apt-get update
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Hit:4 http://nginx.org/packages/mainline/debian buster InRelease
Reading package lists... Done

--allow-releaseinfo-change

这个命令的意思是,允许更新命令继续从改变了版本库信息的版本库中下更新源。

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注