0

I am using Ubuntu 16.04.3 LTS. While installing Firefox, this error is shown:

The following NEW packages will be installed:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  firefox
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 44.5 MB of archives.
After this operation, 176 MB of additional disk space will be used.
Get:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 firefox amd64 58.0.2+build1-0ubuntu0.16.04.1 [44.5 MB]
Err:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 firefox amd64 58.0.2+build1-0ubuntu0.16.04.1                                  
  Hash Sum mismatch
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 firefox amd64 58.0.2+build1-0ubuntu0.16.04.1 [44.5 MB]                        
Err:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 firefox amd64 58.0.2+build1-0ubuntu0.16.04.1                                  
  Hash Sum mismatch
Fetched 88.9 MB in 2min 23s (621 kB/s)                                                                                                         
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/f/firefox/firefox_58.0.2+build1-0ubuntu0.16.04.1_amd64.deb  Hash Sum mismatch

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

How can I fix "Hash Sum mismatch"?

linix
  • 3
  • 7

1 Answers1

1

Try removing all the content of /var/lib/apt/lists directory, you can use this command:

sudo rm -rf /var/lib/apt/lists/*

Then execute this command:

sudo apt update

And finally, try to install firefox again:

sudo apt install firefox

If this doesn't work, you can try:

Settings → Software & Updates → Ubuntu Software: Download from: Change Local to Main Server, or any other Server that is close to you.

Hope it helps.

galoget
  • 2,943
  • 2
  • 20
  • 24
  • Sorry. But it didn't work. I have tried it before... – linix Mar 08 '18 at 14:29
  • Try this: Settings → Software & Updates → Ubuntu Software: Download from: Change Local to Main Server. – galoget Mar 08 '18 at 14:33
  • I isn't working.. Same as before... – linix Mar 08 '18 at 15:06
  • I found [this link](https://askubuntu.com/questions/41605/trouble-downloading-packages-list-due-to-a-hash-sum-mismatch-error) where you cand see various solutions, try them and let me know if it works. – galoget Mar 08 '18 at 15:13
  • Finally worked for this download server: Russian Federation->mirror.logol.ru – linix Mar 09 '18 at 07:35
  • Good to hear that, I will add the answer to my post. – galoget Mar 09 '18 at 08:00
  • I solved my problem and credit goes to you! It's it too funny? – linix Mar 09 '18 at 08:02
  • Well, actually I provided you with the instructions on how to change the `Download from` source, after you tried with some servers, finally it worked with a Russian server. – galoget Mar 09 '18 at 08:03
  • I live in Bangladesh and there are Ubuntu servers too. Russia isn't my closest server. – linix Mar 09 '18 at 08:05
  • The best option is to choose a server that is close to you, but you can choose any server in the world. – galoget Mar 09 '18 at 08:05