升级到 22.10 失败;apt 错误

升级到 22.10 失败;apt 错误

今天尝试使用 sudo do-release-upgrade 来获取 22.10(从 22.04.1 开始)。失败了。现在我的源代码出现了一些错误。

sudo apt更新:

E: Conflicting values set for option Signed-By regarding source http://archive.ubuntu.com/ubuntu/ jammy: /usr/share/keyrings/ubuntu-archive-automatic-2018.gpg != 
E: The list of sources could not be read.

不知道如何修复。有人可以提供一些建议吗?目前其他一切仍然正常。

谢谢。

编辑(抱歉没有发布足够的信息):

我注释掉了 sources.list 中的一行,错误就消失了:

deb [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-automatic-2018.gpg] http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
deb-src [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-automatic-2018.gpg] http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse

deb [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-automatic-2018.gpg] http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
deb-src [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-automatic-2018.gpg] http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse

deb [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-automatic-2018.gpg] http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
deb-src [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-automatic-2018.gpg] http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse

deb [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-automatic-2018.gpg] http://archive.ubuntu.com/ubuntu jammy-security main restricted universe multiverse
deb-src [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-automatic-2018.gpg] http://archive.ubuntu.com/ubuntu jammy-security main restricted universe multiverse

#deb http://archive.ubuntu.com/ubuntu jammy main universe restricted multiverse

我已确保 sources.list.d 中的所有 *.list 文件都已返回给 jammy。

sudo apt升级:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Try Ubuntu Pro beta with a free personal subscription on up to 5 machines.
Learn more at https://ubuntu.com/pro
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

希望这足够了。另外,我刚刚读到 Kinetic 正在逐步升级。我想我错过了,应该再等一等。

答案1

我已将上述编辑重新发布为答案。

/etc/apt/sources.list 中添加了一行没有signed-by语句的额外行。删除/注释掉它就可以了。

deb [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-automatic-2018.gpg] http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
deb-src [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-automatic-2018.gpg] http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse

deb [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-automatic-2018.gpg] http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
deb-src [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-automatic-2018.gpg] http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse

deb [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-automatic-2018.gpg] http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
deb-src [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-automatic-2018.gpg] http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse

deb [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-automatic-2018.gpg] http://archive.ubuntu.com/ubuntu jammy-security main restricted universe multiverse
deb-src [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-automatic-2018.gpg] http://archive.ubuntu.com/ubuntu jammy-security main restricted universe multiverse

#deb http://archive.ubuntu.com/ubuntu jammy main universe restricted multiverse

相关内容