Score:0

I want to get the current version of Ubuntu but I can't upgrade beyond Ubuntu 18.04.6 LTS

kh flag

I have used Ubuntu for many years (about 10 years on this computer). I have upgraded from release to release with no problems in the past. This time, the upgrade from 18.04.6 LTS to version 20.04 fails. I have three types of failure; two with Software updater and one with terminal.

Type 1 with Software updater: When I try to upgrade I get "Failed to download repository information" "Check your Internet connection." This problem is intermittent. Occasionally, it succeeds. All other applications have no problems reaching the Internet. My Internet connection is very reliable with 10Mbps or more download speeds.

Type 2 with Software updater: When I get a repository download and request an upgrade, I start the upgrade process but it fails on step 2 "Setting new software channels" and then it reverts to the current version.

Type 3 with Terminal:

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.canonical.com/ubuntu precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/precise/Release.gpg
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: Some index files failed to download. They have been ignored, or old ones used
 instead.

Any suggestions? I assume I am not pulling information from the proper repository but I don't know how to direct my computer to the right place. Perhaps it is a different issue.

Any help is appreciated.

guiverc avatar
cn flag
Only supported releases of Ubuntu (*standard support*) are on-topic for this site. Ubuntu 12.04 LTS is EOL thus off-topic, and Ubuntu 12.04 ESM was in extended support and only supported by Canonical via Ubuntu Advantage thus also off-topic here. Refer https://askubuntu.com/help/on-topic https://help.ubuntu.com/community/EOLUpgrades https://fridge.ubuntu.com/2017/03/15/ubuntu-12-04-precise-pangolin-reaches-end-of-life-on-april-28-2017/
guiverc avatar
cn flag
If you're actually on 18.04 or *bionic* as you say; why would your system have sources for *precise* or 12.04? Those can't be useful, unless you're wanting old *deprecated* packages in order to explore infection/exploitation of a system. I'd remove those ASAP & assess your install for potential problems, you didn't say if Desktop or Server, but I'd really consider a *clean* install (esp. if Desktop).
guiverc avatar
cn flag
ps: If your system is a Desktop install; I'd likely do a *unclean* or repair install using the system you want to upgrade to... eg. if you want Ubuntu 22.04 LTS, I'd use that; as a re-install (*repair type installation*) allows you to skip releases & thus move you straight to the release you want to go to. Note: I'm assuming desktop & have no idea what *apps* you rely on (if from Ubuntu repositories, if *deprecated* due to Qt4 etc libs & thus removed in 2019. or 3rd party thus not in Ubuntu repositories) but a good internet connection is required for those apps to auto-re-install...
David avatar
kh flag
I am on 18.04.6 LTS. I am trying to get to the next available stable release which my system tells me is 20.04. (I know there is a later stable release but I understand I have to move up sequentially.) I have not been on 12.04 for several years nor do I want to go back there. I don't understand why it is still looking for those files nor do I know how to find the right ones. And yes, I am on a Desktop install. I would like to end up on 22.04 LTS.
guiverc avatar
cn flag
On a *release-upgrade* (eg. from 12.04 or *precise*, to 14.04 or *trusty*) those sources would have been disabled (a "#" added to the start of the line so it's ignored), which means subsequent to that, someone has re-enabled it, either in a GUI tool (*enabled that source*) or by removing the "#" with a text editor.. It may not have been an issue whilst 12.04 ESM was still supported (*not good security wise though*!) but error likely appeared when 12.04 ESM ended... You should remove or just comment out those lines (or *disable* if using a GUI tool)
guiverc avatar
cn flag
https://help.ubuntu.com/community/Repositories/Ubuntu (if helpful)
David avatar
kh flag
I will look at the repositories and attempt what you call an unclean repair. I will report back once I spend some effort. It may be soon or may take a few days. Thanks.
guiverc avatar
cn flag
Chances of *unsafe* packages entering your system via the official Ubuntu repository are *almost NIL*, so do consider the normal *release-upgrade* process from 18.04 to 20.04 using the upgraded path (I suggest reading all upgrade instructions first!) , then IF you have problems the *unclean* (no format) install can be your backup upgrade strategy... I use *unclean* install often, but i'm very familiar with it (& *love that it's very quick*) but I use little 3rd party packages, where you maybe use your system very different to how I do..
guiverc avatar
cn flag
The install method I use I've documented here for QA-testing as used by Lubuntu (refer https://discourse.lubuntu.me/t/testing-checklist-understanding-the-testcases/2743 & the "*Install using existing partition*" testcase)... That doc is intended for QA-testers (not end-users), but I've written about it on this site 30+ times in various places too (*as have others*).. (*Currently that install method works with on Ubuntu Desktop inc. flavors using the `ubiquity` or `calamares` installers.. it's planned to get it working for the new 'canary' installer too for 23.04*)
karel avatar
sa flag
Does this answer your question? [How do I fix the GPG error "NO\_PUBKEY"?](https://askubuntu.com/questions/13065/how-do-i-fix-the-gpg-error-no-pubkey)
Score:3
kh flag

I am successful in my upgrade to 20.04 now. Here is what I did. I took the advice from guiverc in the comments to my original post regarding the errors related to the precise penguin version (12.04) and used the provided information to find and edit the etc/apt/sources.list and etc/apt/sources.list.distUpgrade files. There was one line in each file regarding precise which was not commented out so I made each one a comment. I have never edited those files before so I don't know how the error got in them. However, I can say the root cause of my inability to upgrade was the presence of those two lines in the apt source files.

I did have a high error rate on TCP packets to 91.189.91.39 (about 44% loss) so I changed to a different Ubuntu server. Once I made that change I had no more problems with downloading files. As a reference, I pinged 8.8.8.8 and had no packet loss so it is possible that xenial distribution server is having a problem. Once I had success I quit troubleshooting so I don't know the root cause of the network issues.

Once these changes were made I was able to use the normal upgrade procedure in the "Software update" application.

guiverc avatar
cn flag
Well done for solving it ! (*and thanks for sharing the fix so it may benefit others*)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.