为什么我的 Debian Stretch 更新到了 Buster?

为什么我的 Debian Stretch 更新到了 Buster?

我每周在我的机器/家庭服务器上运行手动更新。

当我运行apt update && apt upgrade命令时,很多包都会被更新。我认为这与buster(我当前的系统应该使用)的发布有关stretch,例如很多安全更新或最后的最终版本/推送stretch..天哪,我错了。经过几次重新启动并修复了一些由于库版本不匹配而无法运行的程序后,我的机器向我提供了包含Debian 10.

这确实很奇怪。我的消息来源表明了这一点:

# grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/*
/etc/apt/sources.list:#
/etc/apt/sources.list:
/etc/apt/sources.list:# deb cdrom:[Debian GNU/Linux 9.3.0 _Stretch_ - Official amd64 NETINST 20171209-12:10]/ stretch main
/etc/apt/sources.list:
/etc/apt/sources.list:# deb cdrom:[Debian GNU/Linux 9.3.0 _Stretch_ - Official amd64 NETINST 20171209-12:10]/ stretch main
/etc/apt/sources.list:
/etc/apt/sources.list:deb http://ftp.nl.debian.org/debian/ stretch main non-free
/etc/apt/sources.list:deb-src http://ftp.nl.debian.org/debian/ stretch main non-free
/etc/apt/sources.list:
/etc/apt/sources.list:deb http://security.debian.org/debian-security stretch/updates main non-free
/etc/apt/sources.list:deb-src http://security.debian.org/debian-security stretch/updates main non-free
/etc/apt/sources.list:
/etc/apt/sources.list:# stretch-updates, previously known as 'volatile'
/etc/apt/sources.list:deb http://ftp.nl.debian.org/debian/ stretch-updates main non-free
/etc/apt/sources.list:deb-src http://ftp.nl.debian.org/debian/ stretch-updates main non-free
/etc/apt/sources.list:# deb-src [arch=amd64] https://download.docker.com/linux/debian stretch stable
/etc/apt/sources.list:
/etc/apt/sources.list:deb [arch=amd64] https://download.docker.com/linux/debian stretch stable
/etc/apt/sources.list:# deb-src [arch=amd64] https://download.docker.com/linux/debian stretch stable
/etc/apt/sources.list:
/etc/apt/sources.list:deb http://ftp.nl.debian.org/debian stretch-backports main
/etc/apt/sources.list.d/mono-official-stable.list:deb https://download.mono-project.com/repo/debian stable-stretch main
/etc/apt/sources.list.d/mono-official-stable.list.save:deb https://download.mono-project.com/repo/debian stable-stretch main
/etc/apt/sources.list.d/stable.list:deb http://ftp.nl.debian.org/debian/ stable main contrib non-free
/etc/apt/sources.list.d/stable.list:deb-src http://ftp.nl.debian.org/debian/ stable main contrib non-free
/etc/apt/sources.list.d/stable.list:
/etc/apt/sources.list.d/stable.list:deb http://security.debian.org/ stable/updates main contrib non-free
/etc/apt/sources.list.d/stable.list.save:deb http://ftp.nl.debian.org/debian/ stable main contrib non-free
/etc/apt/sources.list.d/stable.list.save:deb-src http://ftp.nl.debian.org/debian/ stable main contrib non-free
/etc/apt/sources.list.d/stable.list.save:
/etc/apt/sources.list.d/stable.list.save:deb http://security.debian.org/ stable/updates main contrib non-free
/etc/apt/sources.list.d/testing.list:# deb http://ftp.nl.debian.org/debian/ testing main contrib non-free
/etc/apt/sources.list.d/testing.list:# deb-src http://ftp.nl.debian.org/debian/ testing main contrib non-free
/etc/apt/sources.list.d/testing.list:
/etc/apt/sources.list.d/testing.list:# deb http://security.debian.org/ testing/updates main contrib non-free
/etc/apt/sources.list.d/testing.list.save:#deb http://ftp.nl.debian.org/debian/ testing main contrib non-free
/etc/apt/sources.list.d/testing.list.save:#deb-src http://ftp.nl.debian.org/debian/ testing main contrib non-free
/etc/apt/sources.list.d/testing.list.save:
/etc/apt/sources.list.d/testing.list.save:#deb http://security.debian.org/ testing/updates main contrib non-free

我的来源中没有任何内容表明我的安装应该是buster.几乎一切都指向stretch.

检查版本确实指向10.0

# cat /etc/debian_version
10.0

哪里出了问题,为什么会发生在我身上(再说一遍,上次是杰西在工作中在 PROD 服务器上伸展……呃,糟糕的时光!)?我想 Debian 不会随意更新到新版本?

另外,我该如何解决这个奇怪的意大利面条混乱,并在不从头开始的情况下解开我的 Debian 安装?我不在乎我的安装是stretchbuster,但我不希望它们混合在一起,最重要的是我不希望它在进行定期安全更新时更新到新版本!

答案1

您在不同的地方同时启用了多个不同的版本。

/etc/apt/sources.list.d/stable.list:deb http://ftp.nl.debian.org/debian/ stable main contrib non-free

这行代码表示您stable最近想要来自 ie buster 的包裹。这些“目的”标签始终指向相关版本:oldstable现在指的是拉伸,testing指的是靶心。

/etc/apt/sources.list:deb http://ftp.nl.debian.org/debian/ stretch main non-free

这个是明确地从stretch获取包,并且当新版本出现或stretch变得旧稳定时,这一点不会改变。

/etc/apt/sources.list.d/mono-official-stable.list:deb https://download.mono-project.com/repo/debian stable-stretch main
/etc/apt/sources.list:deb [arch=amd64] https://download.docker.com/linux/debian stretch stable

这些是第三方存储库,其中包含专门用于拉伸的包。它们将依赖于主线扩展包。

您的某些版本不匹配可能是由于这种混合造成的(特别是,升级说明建议在此期间禁用第三方存储库)。拉伸更新和拉伸向后移植线应该为了安全起见,但我也会禁用它们进行升级。一旦你进入了破坏状态,它们就不再有任何作用了。


一般来说,如果您不特别想要这样的升级,您将希望将所有的sources.list条目标记为代号(stretch、buster)而不是分支标签(stable)。这样,您就可以通过更改出现的所有关键字来选择更新时间,然后按照升级说明进行操作。

目前,新版本发布时的自动升级正是您在 stable.list 顶部代码框中所要求的。这似乎是 stable.list 的全部目的(对于testing.list 中的注释行也是如此)。

一旦拉伸和稳定不再是同义词,版本的不良混合是同时启用的副作用。

巴斯特实际上已经出去过将近一个月了,所以在您的每周更新周期中,您的镜像更新似乎有点慢,否则几周前就会发生这种情况。这也可能是需要跟进的一个问题。


目前,您实际上无法向后滚动以进行伸展,并且需要完全向前移动以进行破坏。将出现的“stretch”和“stable”更新为“buster”,并查阅升级说明。从事情的声音来看,你可能仍然需要一个apt full-upgrade,但可能会一直完成剩下的事情。

我建议暂时禁用外部存储库,并在升级的其余部分完成后根据它们自己的指令重新设置它们。两者之间可能发生组织更改,导致升级路径不干净,并且您可能还想删除从中安装的软件包,并在设置新存储库后重新安装它们。

将来,请始终在源代码中使用版本名称,这样就不会出现此问题。

相关内容