As of a few days ago I'm getting the notorious ―

enter image description here

Several other answers suggest it will solve by itself on the next day, or trying various commands in a voodoo-like manner. This question asks for a way to find out what exactly is wrong, in order to proceed without randomly running various commands.

Ubuntu 14.04.

Specific error shown in the console flow: E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/libmysqlclient18_5.5.47-0‌​ubuntu0.14.04.1_amd64.deb Hash Sum mismatch

  • 1
    Please run sudo apt-get update and then sudo apt-get upgrade and edit your question to paste the output of the second command. Then leave me a comment containing '@ByteCommander' to notify me and I'll review it. Thanks. – Byte Commander Jan 27 '16 at 17:24
  • Why dont you try to get some more info. Open a terminal (ctrl+alt+t), go sudo apt-get update. When that finishes simulate a dist-upgrade with sudo apt-get -s dist-upgrade. Nothing will actually be done because of the -s, read thru the terminal output carefully, if ok then run command for real by removing the -s. If suspect post complete terminal output for the simulated dist-upgrade. – doug Jan 27 '16 at 17:27
  • @ByteCommander Specific error shown in the console flow: E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/libmysqlclient18_5.5.47-0ubuntu0.14.04.1_amd64.deb Hash Sum mismatch – matt Jan 29 '16 at 19:56

First clear apt cache

sudo apt-get autoclean 

Backup all sources list files.

sudo cp -a /etc/apt/sources.list /etc/apt/sources.list_backup  
sudo cp -a /etc/apt/sources.list.d/ /etc/apt/sources.list.d_backup

Clear faulty sources.list and remove its files.

sudo rm -f /etc/apt/sources.list
sudo rm -rf /etc/apt/sources.list.d/*

Create new sources.list

sudo nano /etc/apt/sources.list

Copy Following content and save the sources.list file

#                            OFFICIAL UBUNTU REPOS                             #

###### Ubuntu Main Repos
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse 

Now Upgrade Packages

sudo apt-get update && sudo apt-get upgrade 
  • Why should this procedure be safe or necessary? – matt Jan 29 '16 at 19:59
  • backup is not necessary, but I like some thing kind of Standard. – Ketan Patel Jan 30 '16 at 8:12
  • There is no apt-get clear, that command is nonsense! Also some other commands really needed improvement (e.g. you tried to delete /etc/sources.lits instead of /etc/apt/sources.list). And one should never run GUI applications like gedit as root using sudo. I replaced it with gksudo to avoid messing up the home directory permissions. – Byte Commander Jan 30 '16 at 17:08
  • This answer is a great way of not explaining why things are a fit for the problem at hand. – matt Feb 1 '16 at 18:43

I had the problem too, it was the Multiverse repository that had been unselected - by an upgrade to 15.10 try checking Software and Upgrades settings!

enter image description here

After restoring the checkmarks, and doing the mandatory

sudo apt-get update
sudo apt-get upgrade

It installed the software bar 2 PPA's I had to fix under the Other Software tab to the right!

  • 1
    I recommend unchecking the DVD as source, unless you plan to ever use it for that and leave it in the drive, which is also bad because it gets outdated quickly. – Byte Commander Jan 27 '16 at 17:26

Most of what's been written as answers here is essentially a sequence of voodoo. The actual flow I used to work around the failing update, that blocked the entire process has been:

  1. In a terminal, run sudo apt-get upgrade
  2. Identify the failing update from the error there (as no one bothered making the update error show in the update UI). This required some guessing, to derive the package name from the failing file showing in the error message. Luckily apt-mark also offers unhold so I could undo my first bad guess about the package name.
  3. put the failing update on hold, using sudo apt-mark hold.
  4. rerun apt-get upgrade, which now skips the package put on hold.

After this, however, the Updater UI will keep showing the annoying message this all started from, for eternity it seems.

  • apt-get upgrade will throw an error if you aren't logged in as root. (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? I suggest that you edit your answer to include sudo prior to the commands you left it out of. – Elder Geek Jan 31 '16 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.