I upgraded my laptop from Ubuntu 14.04 LTS to 16.04 LTS. The keepass2 package could not be installed during the upgrade. So I skipped it to have the computer working again.

Today I tried to install keepass2, now using apt-get:

sudo apt-get update
sudo apt-get install keepass2

but I get the following error message:

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/k/keepass2/keepass2_2.32+dfsg-1_all.deb  Hash Sum mismatch

I also tried to download the package using firefox directly from http://packages.ubuntu.com/xenial/all/keepass2/download so I could install it using dpkg, but the package seems to have some problem. Firefox opens a pop up window with the error message:

/tmp/mozilla_srv0/44Gr76dJ.deb.part could not be saved, because the source file could not be read.

When downloading the file with wget and checking its md5sum signature the results is not the expected correct one.

$ wget http://cz.archive.ubuntu.com/ubuntu/pool/universe/k/keepass2/keepass2_2.32+dfsg-1_all.deb
$ md5sum keepass2_2.32+dfsg-1_all.deb
9d21dfe6ff3374e05b84615abc0aa7f3  keepass2_2.32+dfsg-1_all.deb

Do you know how to install this package correctly?


This guide seems to be working for me.

sudo apt-add-repository ppa:jtaylor/keepass
sudo apt-get update
sudo apt-get install keepass2 
  • same as the other answer – Zanna Mar 12 '17 at 13:02

That's a strange one, but I've seen similar errors before from package files that had their download corrupted by a sketchy wifi connection on my end.

First I'd do a complete removal of the failed install using

sudo apt-get purge keepass*

and clean out your local repository with

sudo apt-get clean

Then try downloading the .deb file again from http://archive.ubuntu.com/ubuntu/pool/universe/k/keepass2/ (we're up to version 2.34 now; if you haven't got it working yet maybe you'll have more luck with the newest version ;) and run it with Ubuntu's software manager.

If that doesn't work, run another purge and clean on keepass2, then try the .deb package download from debian.org by installing it as you normally would.

If that doesn't work, jtaylor's PPA might. Run another purge and clean, then run

sudo add-apt-repository ppa:jtaylor/keepass
sudo apt-get update
sudo apt-get install keepass2

and see how that works out.

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.