我正在尝试从 ubuntu 17.04 升级到 17.10。我发现了类似的问题,例如:
我按照答案中提到的步骤进行操作:
1. sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
2. sudo apt-get update && sudo apt-get dist-upgrade
3. sudo apt-get update
4. sudo apt-get install update-manager-core
5. sudo do-release-upgrade
我收到此错误:
Recherche d'une nouvelle version d'Ubuntu
ERROR:root:parse failed for '/var/lib/update-manager/meta-release'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py", line 374, in download
self.parse()
File "/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py", line 244, in parse
"Required key '%s' missing" % required_key)
UpdateManager.Core.MetaRelease.MetaReleaseParseError: Required key 'Supported' missing
No new release found.
输出sudo apt-get update
:
Hit:1 http://archive.canonical.com/ubuntu zesty InRelease
Hit:2 https://download.docker.com/linux/ubuntu zesty InRelease
Hit:3 https://cli-assets.heroku.com/branches/stable/apt ./ InRelease
Hit:4 https://download.sublimetext.com apt/stable/ InRelease
Get:6 https://packages.microsoft.com/repos/vscode stable InRelease [2802 B]
Hit:6 https://packages.microsoft.com/repos/vscode stable InRelease
Hit:5 https://packagecloud.io/datawireio/telepresence/ubuntu zesty InRelease
Hit:7 http://old-releases.ubuntu.com/ubuntu zesty InRelease
Ign:8 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:9 http://old-releases.ubuntu.com/ubuntu zesty-updates InRelease
Hit:10 http://old-releases.ubuntu.com/ubuntu zesty-backports InRelease
Hit:11 http://dl.google.com/linux/chrome/deb stable Release
Hit:12 http://old-releases.ubuntu.com/ubuntu zesty-security InRelease
Get:14 http://download.virtualbox.org/virtualbox/debian wily InRelease [7133 B]
Ign:15 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 InRelease
Get:16 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release [3457 B]
Ign:14 http://download.virtualbox.org/virtualbox/debian wily InRelease
Get:17 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release.gpg [801 B]
Err:17 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release.gpg
The following signatures were invalid: EXPKEYSIG BC711F9BA15703C6 MongoDB 3.4 Release Signing Key <[email protected]>
Fetched 11.4 kB in 20s (550 B/s)
Reading package lists... Done
W: GPG error: http://download.virtualbox.org/virtualbox/debian wily InRelease: The following signatures were invalid: 7B0FAB3A13B907435925D9C954422A4B98AB5139
W: The repository 'http://download.virtualbox.org/virtualbox/debian wily InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release: The following signatures were invalid: EXPKEYSIG BC711F9BA15703C6 MongoDB 3.4 Release Signing Key <[email protected]>
W: Failed to fetch http://repo.mongodb.org/apt/ubuntu/dists/xenial/mongodb-org/3.4/Release.gpg The following signatures were invalid: EXPKEYSIG BC711F9BA15703C6 MongoDB 3.4 Release Signing Key <[email protected]>
W: Some index files failed to download. They have been ignored, or old ones used instead.
输出sudo apt-get dist-upgrade
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
libgsoap10 libqt4-opengl libvncserver1 linux-headers-4.10.0-19 linux-headers-4.10.0-19-generic linux-headers-4.10.0-28 linux-headers-4.10.0-28-generic linux-headers-4.10.0-30
linux-headers-4.10.0-30-generic linux-headers-4.10.0-33 linux-headers-4.10.0-33-generic linux-headers-4.10.0-35 linux-headers-4.10.0-35-generic linux-headers-4.10.0-37 linux-headers-4.10.0-37-generic
linux-headers-4.10.0-38 linux-headers-4.10.0-38-generic linux-image-4.10.0-19-generic linux-image-4.10.0-28-generic linux-image-4.10.0-30-generic linux-image-4.10.0-32-generic
linux-image-4.10.0-33-generic linux-image-4.10.0-35-generic linux-image-4.10.0-37-generic linux-image-4.10.0-38-generic linux-image-extra-4.10.0-19-generic linux-image-extra-4.10.0-28-generic
linux-image-extra-4.10.0-30-generic linux-image-extra-4.10.0-32-generic linux-image-extra-4.10.0-33-generic linux-image-extra-4.10.0-35-generic linux-image-extra-4.10.0-37-generic
linux-image-extra-4.10.0-38-generic linux-signed-image-4.10.0-28-generic linux-signed-image-4.10.0-30-generic linux-signed-image-4.10.0-32-generic linux-signed-image-4.10.0-33-generic
linux-signed-image-4.10.0-35-generic linux-signed-image-4.10.0-37-generic linux-signed-image-4.10.0-38-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
输出sudo apt-get install -f
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libgsoap10 libqt4-opengl libvncserver1 linux-headers-4.10.0-19 linux-headers-4.10.0-19-generic linux-headers-4.10.0-28 linux-headers-4.10.0-28-generic linux-headers-4.10.0-30
linux-headers-4.10.0-30-generic linux-headers-4.10.0-33 linux-headers-4.10.0-33-generic linux-headers-4.10.0-35 linux-headers-4.10.0-35-generic linux-headers-4.10.0-37 linux-headers-4.10.0-37-generic
linux-headers-4.10.0-38 linux-headers-4.10.0-38-generic linux-image-4.10.0-19-generic linux-image-4.10.0-28-generic linux-image-4.10.0-30-generic linux-image-4.10.0-32-generic
linux-image-4.10.0-33-generic linux-image-4.10.0-35-generic linux-image-4.10.0-37-generic linux-image-4.10.0-38-generic linux-image-extra-4.10.0-19-generic linux-image-extra-4.10.0-28-generic
linux-image-extra-4.10.0-30-generic linux-image-extra-4.10.0-32-generic linux-image-extra-4.10.0-33-generic linux-image-extra-4.10.0-35-generic linux-image-extra-4.10.0-37-generic
linux-image-extra-4.10.0-38-generic linux-signed-image-4.10.0-28-generic linux-signed-image-4.10.0-30-generic linux-signed-image-4.10.0-32-generic linux-signed-image-4.10.0-33-generic
linux-signed-image-4.10.0-35-generic linux-signed-image-4.10.0-37-generic linux-signed-image-4.10.0-38-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
该命令sudo dpkg --configure -a
不返回任何值。
我点击了很多链接,但升级失败。我该如何解决?
答案1
aptitude
在 17.04 系统上安装:
sudo apt-get install aptitude
如果没有其他帮助,您可以改old-releases.ubuntu.com
回archive.ubuntu.com
然后zesty
改为arftul
:
sudo sed -i -re 's/old-releases.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list
sudo sed -i -re 's/zesty/artful/g' /etc/apt/sources.list
然后使用升级系统
sudo aptitude update
sudo aptitude dist-upgrade
答案2
这是从 Ubuntu 的生命周期结束版本升级到受支持的系统的推荐解决方案,按照说明操作应该可以起作用(对我来说确实如此)。