Apt-get Update the reason for the hash sum mismatch when updating Ubuntu and how to solve it

Source: Internet
Author: User
Tags free ssh proxychains

$ sudo apt-get update

......
Hit http://mirrors.163.com Trusty/main Sources
Hit http://mirrors.163.com trusty/restricted Sources
Get:17 http://mirrors.163.com trusty/universe Sources [6,399 KB]
Hit http://mirrors.163.com trusty/multiverse Sources
ERR http://mirrors.163.com Trusty-security/main i386 Packages
404 Not Found [ip:123.58.190.235 80]
Fetched 41.0 MB in 1min 3s (643 kb/s)
w:failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-security/main/binary-amd64/Packages Hash Sum mismatch
w:failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-security/main/binary-i386/Packages 404 Not Found [ip:123 .58.190.235 80]
w:failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-security/restricted/binary-i386/Packages Hash Sum Mismatch
w:failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-updates/restricted/source/Sources Hash Sum mismatch
w:failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-updates/main/binary-amd64/Packages Hash Sum mismatch
w:failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-updates/restricted/binary-amd64/Packages Hash Sum Mismatch

......

I guess a lot of people have come across this problem, searching for half a day discover all the Chinese in China none of the solutions that describe this problem are available.

with the query in English, the party get positive solution, in order to avoid more people doubt, rarely posted I decided to put the real reason for this problem to inform everyone.

refer to Askubuntu.com above for the original explanation of this problem,

References:This is a known issue, and are exacerbated for clients behind Proxycaches. Some large organisations and ISPs (especially in remoteparts of the world) has transparent caches of which you are Aware.

The fundamental issue is and the apt repository format is Subjectto race conditions when a mirror is updated. This problemparticularly affects repositories the change rapidly, such as thedevelopment release.

You can track progress on the fix for this (markyourself as "affects me too" in the bug) and this B Lueprint. But beaware that it's a complex issue and may take more than one releaseto resolve.
Shareimprove This answer

answered Jul 5 ' at 22:21



You use the network provider, some will set some transparent cache to increase the internal speed of the network, reduce the flow of exports, some of the files you get are not real files on the source server, is obtained from the cache, when the cache to obtain some of the checksum is inconsistent with the source, the natural hint check failed, The update cannot continue.

This issue is actually related to the format design of the APT software warehouse. The newly released version of the Software warehouse update is more frequent, in the sense that the cache files should be updated synchronously, but because of the speed of multiple mirror sites, resulting in the cache can not guarantee consistency.
This problem does not exist when the network provider is strong enough to not be set to transparent caching. This is why some people feedback using wireless Internet card (mobile, Unicom's 3g network) on everything OK, a single switch back to the Great Wall broadband, or broadband pass.

These are the real reasons why the problem arises.

My home network is broadband access, no doubt this network ISP will definitely set transparent cache.
the solution is simple, bypassing the cache and directly accessing the site.
How to bypass this cache set by the ISP, just like bypassing the Great Firewall.
I found a free SSH service proxy,
Install a proxychains and set up your agent in/etc/proxychians.conf
Using proxychains sudo apt-get update

Update normal (no matter which source you update, domestic or foreign)

If you think the agent is not fast enough, just update the source index, install the software directly sudo apt-ge installxxx, you can. It's no problem to install all kinds of software in the Software Center.


The fundamental solution to this problem is related to the format design of apt repository.
But ISPs in Europe and the United States seem to be good enough to set up fewer caches, and not many people are mentioning the problem anyway. So they are not going to be able to improve the design really unpredictable.

There is also a natural solution, that is, when the source index gradually stabilized, your ISP's cache is consistent with the real data, the update is naturally not a problem.
Updates must be frequent at the time of release, and most of the new versions cannot be expected to wait.


The above is about the cause of the hash summismatch problem when updating the source index, and the solution, I hope to help you friends.

Apt-get Update the reason for the hash sum mismatch when updating Ubuntu and how to solve it

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.