0

Upgrade begins in the terminal, runs for a few minutes downloading 'trusty' packages and then stops with the error message below:

W:Failed to fetch 
http://extras.ubuntu.com/ubuntu/dists/oneiric/main/source/Sources 404 
Not Found 
E:Some index files failed to download. They have been ignored, or 
old ones used instead. 
Restoring original system state
Aborting

Note the 'oneiric' - I did upgrade from oneiric to precise a few years back and have always got error messages when updating, referring to 'oneiric'. I have tried to follow advice on here for upgrading and have not found and other questions that have given me the answer to this puzzle.

Zanna
  • 70,465
  • Check /etc/apt/sources.list for oneiric. – muru Sep 12 '17 at 10:29
  • oneiric was 11.10 (from memory) which has been long out of support. any references to it need to be # commented-out to remove the errors so the system doesn't go looking for non-existent updates and throw errors. – guiverc Sep 12 '17 at 11:02
  • Thanks guiverc. How to I go about 'commenting-out' the references to oneiric? – johnnyhrvat Sep 12 '17 at 11:08
  • I think the best thing for you to do is a fresh install of (I'd recommend) Ubuntu 16.04, especially if you already updated your system to 12.04 – you may save yourself a lot of trouble. – dessert Sep 12 '17 at 11:32
  • 1
    @dessert - Upgrading 12.04 to 14.04 should be supported. You need to clean up your sources list, you can do this in software center or the command line. See https://help.ubuntu.com/lts/serverguide/configuration.html and https://repogen.simplylinux.ch/ . Include only 12.04 and no ppa or external repos – Panther Sep 12 '17 at 13:19

2 Answers2

0

Thanks for the help - now downloaded. I managed to piece it together from the answers here but I probably could have done with someone 'holding my hand' through the process! For anyone coming later with a similar problem, this is the cure in Terminal.

sudo -i

gedit /etc/apt/sources.list

Opens a gedit document - put a # before any line that includes oneiric (in my case) - save and close.

logout

sudo apt-get update

There should be no more error messages. Then upgrade if you wish.

sudo apt-get upgrade
  • sudo apt-get upgrade does not upgrade your system to 14.04, nor does sudo apt-get dist-upgrade. – Panther Sep 12 '17 at 15:11
  • Sorry, I think I typed sudo apt-get upgrade -c then it offered the upgrade to 14.04. It took a few hours to download and install and then restarted so I did not have the exact text. – johnnyhrvat Sep 12 '17 at 18:44
  • Can you post the output of lsb_release -a – Panther Sep 12 '17 at 19:45
0

To convert my comment to an answer, when upgrading you need to clean up your repositories.

First step, back up your data, just in case there is a problem with the upgrade.

Second, read the release notes: https://help.ubuntu.com/community/UpgradeNotes

In your case, https://wiki.ubuntu.com/TrustyTahr/ReleaseNotes and https://wiki.ubuntu.com/TrustyTahr/ReleaseNotes#Upgrading_from_Ubuntu_12.04_LTS_or_Ubuntu_13.10

Then you disable all ppa and any third party repositories. After the upgrade you can re-enable them but you always need to check as sometimes 3rd party repos and ppa lag or go unmaintained.

Along those lines, do not mix and match repositories across versions of Ubuntu. So do not use a mix of 14.04 with any other release such as 16.04 or what have you.

See https://help.ubuntu.com/community/Repositories/Ubuntu and https://help.ubuntu.com/lts/serverguide/configuration.html

To restore your repositories see https://repogen.simplylinux.ch/

For the old 12.04 repositories see How to install software or upgrade from an old unsupported release?

You can then proceed with the upgrade, see How do I upgrade to a newer version of Ubuntu?

After the upgrade, as I indicated, you can add or re-enable ppa.

Panther
  • 102,067