"hash sum mismatch" error when doing update
31,946
To get rid of this error, hit the keyboard shortcut Ctrl+Alt+T to open a terminal window.
Then type the commands given below in the terminal one-by-one:
sudo rm -rf /var/lib/apt/lists/*
sudo apt clean
sudo apt update
Related videos on Youtube
Author by
dumadum
Updated on September 18, 2022Comments
-
dumadum almost 2 years
I have just installed 16.04 LTS. However, I cannot update.
$ sudo apt-get update Fetched 34,3 MB in 1h 51min 52s (5.110 B/s) Reading package lists... Done E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial-updates/universe/binary-i386/by-hash/SHA256/e145fc3961ba6091b075afe8b3a89a5f58e1346b7d6cb0a1f4166dfcc3201392 Hash Sum mismatch E: Some index files failed to download. They have been ignored, or old ones used instead.
I tried to many thing, but didn't help. I tried the solutions from Trouble downloading packages list due to a "Hash sum mismatch" error, but it didn't solve the problem.
-
dumadum over 7 years@GautamVashisht No I tried that solutions but it didn't solve the problem.
-
Gautam Vashisht over 7 yearsDid you do
sudo apt clean
after doingsudo rm -rf /var/lib/apt/lists/*
? -
dumadum over 7 yearsIt helped thanks, but now, I cannot install anything from terminal. For example:
sudo apt-get install opera Reading package lists... Done Building dependency tree Reading state information... Done Package opera is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'opera' has no installation candidate
-
Gautam Vashisht over 7 yearsDo
sudo apt update
first and then dosudo apt install opera
-
dumadum over 7 years@GautamVashisht I am sorry to forget to say, yes I did update than install opera.
-
Gautam Vashisht over 7 yearsOpera is not present in official Ubuntu Software in Ubuntu 16.04 LTS. To install it, take a look at this link :- askubuntu.com/questions/765483/…
-
dumadum over 7 years@GautamVashisht thanks for your help! it solved my problem.
-
-
Thiago Falcao almost 7 yearsIf you know the invalid file, you can just remove it, and update will run faster. Otherwise, you will have to download all again.
-
Clock ZHONG over 6 yearsI've used your solution, but it still failed with the following error messages: W: archive.canonical.com/dists/precise/Release.gpg: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1) E: Failed to fetch download.nus.edu.sg/mirror/ubuntu/dists/xenial-updates/main/… Hash Sum mismatch
-
Gautam Vashisht over 6 years@Clock ZHONG Run
sudo rm -rf /var/cache/apt/*
in terminal. If it still doesn't work, take a look at this link - askubuntu.com/questions/679233/… . Hope it helps ! -
Clock ZHONG over 6 years@ Gautam Vashisht , thanks! I've fixed this issue by changing the repository server to the US UBUNTU official site. It seems not all Ubuntu's repository servers maintained well. I'm not sure how Ubuntu maintains those free repository servers, but it's obvious that there are some problems in the current management solution.
-
matanster about 6 yearsActually, why is this solution ignoring the security warning that this error message describes? why is it secure to just ignore this warning saying that the update source is maliciously modified or insecure?