Unable to upgrade from ubuntu 17.04 to 17.10

I'm trying to upgrade from ubuntu 17.04 to 17.10. I found similar questions such as:

  1. Failed to release upgrade from 17.04 to 17.10
  2. How to install software or upgrade from an old unsupported release?

I followed the steps mentioned in the answer:

 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

I got this error:

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.

The output of 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.

The output of 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.

The output of 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.

The command sudo dpkg --configure -a does not return any value.

I followed many links and I didn't succeed to upgrade it. How can I fix that?


Solution 1:

Install aptitude on 17.04 system with:

sudo apt-get install aptitude

If nothing else helps you can change old-releases.ubuntu.com back to archive.ubuntu.com and then zesty to 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

And then upgrade system with

sudo aptitude update
sudo aptitude dist-upgrade

Solution 2:

This is the recommended solution to upgrade from an End Of Life release of Ubuntu to a supported system, follow the instructions and should work (It did for me).

https://help.ubuntu.com/community/EOLUpgrades