Debian Buster 发布后如何配置 apt

Debian Buster 发布后如何配置 apt

我目前在计算机上运行 Debian Buster 进行测试。既然 Buster 已经稳定了,我应该如何更新我的系统?

具体来说,如何配置 /etc/apt/sources.list?

目前它看起来像这样:

# deb cdrom:[Official Debian GNU/Linux Live 9.9.0 xfce 2019-04-27T10:47]/ stretch main
# deb cdrom:[Official Debian GNU/Linux Live 9.9.0 xfce 2019-04-27T10:47]/ stretch main

deb http://ftp.uk.debian.org/debian/ buster main
deb-src http://ftp.uk.debian.org/debian/ buster main
deb http://security.debian.org/debian-security/ buster/updates main
deb-src http://security.debian.org/debian-security/ buster/updates main

#stretch-updates, previously known as 'volatile'
deb http://ftp.uk.debian.org/debian/ buster-updates main
deb-src http://ftp.uk.debian.org/debian/ buster-updates main

当我运行时,sudo apt-get update我得到这个输出:

Ign:1 http://deb.debian.org/debian stretch InRelease
Get:2 http://security.debian.org/debian-security buster/updates InRelease [31.1 kB]
Get:3 http://ftp.uk.debian.org/debian buster InRelease [118 kB]                  
Get:4 http://deb.debian.org/debian stretch Release [118 kB]
Get:5 http://ftp.uk.debian.org/debian buster-updates InRelease [46.8 kB]
Get:6 http://deb.debian.org/debian stretch Release.gpg [2,434 B]
Reading package lists... Done          
E: Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'testing' to 'stable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
N: Repository 'http://ftp.uk.debian.org/debian buster InRelease' changed its 'Version' value from '' to '10.0'
E: Repository 'http://ftp.uk.debian.org/debian buster InRelease' changed its 'Suite' value from 'testing' to 'stable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
E: Repository 'http://ftp.uk.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'testing-updates' to 'stable-updates'
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 stretch Release' 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.

更新:我运行sudo apt update并与更新管理器进行了以下对话:

geoff@geoff-debian:/etc/apt$ sudo apt update
Get:1 http://ftp.uk.debian.org/debian buster InRelease [118 kB]
Get:2 http://security.debian.org/debian-security buster/updates InRelease [31.1 kB]                
E: Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'testing' to 'stable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
Do you want to accept these changes and continue updating from this repository? [y/N] y
Get:3 http://ftp.uk.debian.org/debian buster-updates InRelease [46.8 kB]                                                 
Ign:4 http://deb.debian.org/debian stretch InRelease                                                                     
Get:5 http://deb.debian.org/debian stretch Release [118 kB]                                                              
Get:6 http://security.debian.org/debian-security buster/updates/main Sources [1,688 B]                                   
Get:7 http://deb.debian.org/debian stretch Release.gpg [2,434 B]                                                         
Get:8 http://security.debian.org/debian-security buster/updates/main amd64 Packages [1,448 B]                            
Get:9 http://security.debian.org/debian-security buster/updates/main Translation-en [1,364 B]                            
N: Repository 'http://ftp.uk.debian.org/debian buster InRelease' changed its 'Version' value from '' to '10.0'           
E: Repository 'http://ftp.uk.debian.org/debian buster InRelease' changed its 'Suite' value from 'testing' to 'stable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
Do you want to accept these changes and continue updating from this repository? [y/N] y
E: Repository 'http://ftp.uk.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'testing-updates' to 'stable-updates'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
Do you want to accept these changes and continue updating from this repository? [y/N] y
E: Repository 'http://deb.debian.org/debian stretch Release' 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.
Do you want to accept these changes and continue updating from this repository? [y/N] y
Fetched 171 kB in 1min 6s (2,594 B/s)                                                                                    
Reading package lists... Done
Building dependency tree       
Reading state information... Done
159 packages can be upgraded. Run 'apt list --upgradable' to see them.
geoff@geoff-debian:/etc/apt$ 

这样可以吗?我特别关心旧稳定版消息。我还应该保留这个存储库吗?

答案1

tl;dr:运行一次apt-get update --allow-releaseinfo-change

编辑:2023 年再次bullseye发生同样的事情。bookworm

这里发生的情况是,本地 apt 数据库记住您的包源“发布信息”为“busterAsTesting”,并且在更新时返回“busterAsStable”。

这会导致错误,并提示您需要“允许更改发布版本信息”。

幸运的是,apt-get有一个选项,名字很贴切allow-releaseinfo-change

当使用此选项运行 apt-get 时,它会注意到 -as without- 版本差异(-lines N:),但现在按照要求接受它,然后更新本地数据库。

答案2

  1. 开放突触
  2. 在菜单中选择设置-->存储库
  3. 在标签中取消选中所有内容
  4. 关闭标签并让它进行更新
  5. 再次打开存储库对话框并检查您想要的所有内容
  6. 关闭标签并再次更新即可

答案3

我建议使用

apt update --allow-releaseinfo-change

这是因为 apt-get update --allow-releaseinfo-change 对我来说不起作用。

我无法对上面接受的答案发表评论。因此,如果其他方法都失败了,请使用我的答案。

答案4

这不是一个“问题”,也没有理由运行 synaptic 并乱搞或更改 sources.list。这也不是 bug。

apt 清楚地解释了发生了什么。

需要做的就是接受改变。

相关内容