When Ubuntu uses the apt-get Update command, it prompts hash Sum mismatch the wrong solution

Source: Internet
Author: User

The newly installed Ubuntu 14.04 LTS is always prompted for the hash Sum mismatch error when the sudo apt-get Update command is updated, and a number of ways have been found online.
Some methods, sometimes useful, sometimes do not work. First of all, the common online approach, and finally said once and for all solution.

Option one: replace the software download source, you can through the system settings software & updates for source settings.

Programme II:

Use the following command:
sudo apt-get clean
sudo rm-rf/var/lib/apt/lists/*
sudo apt-get update

Programme III:
Use the following command:
sudo apt-get clean
sudo apt-get update--fix-missing
For scenario two, I tried it, it worked, but then it didn't work.

Finally, a final solution is found on a foreign blog. First address: fixing apt Hash Sum mismatch:consistent apt repositories
simply: When using APT commands, attach Parameters-O acquire-by-hash=yes
but this life The order was supported in Apt 1.2.10 and later (Ubuntu 16.04 supports this command), and Ubuntu 14.04 has a lower apt version, so it is necessary to install a new version of Apt tool. The
Install the new version of the command is as follows:
Curl-s https://packagecloud.io/install/repositories/computology/apt-backport/script.deb.sh | sudo bash
sudo apt-get install apt=1.2.10
If you have 12.04 children's shoes, you can refer to Bowen:
Apt 1.2.10 backport for Ubuntu Trusty (14. With Ubuntu Precise (12.04)
Use the sudo apt-get update-o acquire-by-hash=yes command to update the software source later, it is unlikely that the hash Sum mismatch error will occur.
If you still have errors, try adding the-o acquire::https::no-cache=true-o acquire::http::no-cache=true These two parameters to request a cache file for the APT server.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.