There is a problem in Ubuntu that will often plague you, that is, running apt-get update prompts that the Hash checksum does not match.
W: cannot download bzip2:/var/lib/apt/lists/partial/mirrors.163.com _ ubuntu_dists_saucy-security_universe_binary-i386_Packages Hash checksum does not match
W: cannot download bzip2:/var/lib/apt/lists/partial/mirrors.163.com _ ubuntu_dists_saucy-security_multiverse_binary-i386_Packages Hash checksum does not match
W: unable to download bzip2:/var/lib/apt/lists/partial/repo.mate-desktop.org _ ubuntu_dists_saucy_main_binary-amd64_Packages Hash checksum does not match
W: unable to download bzip2:/var/lib/apt/lists/partial/repo.mate-desktop.org _ ubuntu_dists_saucy_main_binary-i386_Packages Hash checksum does not match
E: Some index files failed to download. They have been ignored, or old ones used instead.
There are various solutions for searching on the Internet, but the final judgment is still the cause of the network. Since it is determined that it is caused by the network, there is a corresponding solution.
Method 1 configure http sever for APT.
Because I have enabled the SSH SERVER in VPS, it is very convenient to enable the SSH TUNNEL, but it is a pity that apt-get only supports http proxy, therefore, you also need to install privoxy to convert the scoks5 proxy of ssh tunnel to the http proxy.
For more information about enabling and managing ssh tunnel, see the previous article: gSTM-graph ssh Tunnel manager.
Here we will talk about the installation and configuration of privoxy:
A. Install
Sudo apt-fast install privoxy
B. Configuration
Edit/etc/privoxy/config to enable socks to convert http to privoxy. Find the bold line below in config, remove the comment #, and change the port number to the one set in the previous ststamp.
Listen-address localhost: 8118
# Forward-socks5/127.0.0.1: 7070
Save and start privoxy.
Sudo/etc/init. d/privoxy start
Finally, update apt through http proxy
Sudo apt-get-o Acquire: http: proxy = "http: // 127.0.0.1: 8118/" update
Method 2: replace apt-get with apt-fast. This is an unexpected discovery. If apt-fast is used, there will be no Hash check inconsistency.
Apt-fast is a script that uses axel to accelerate the installation of apt-get Software. Because it is a multi-threaded download, the acceleration effect is quite obvious.
Add a PPA source and install apt-fast
Sudo add-apt-repository ppa: tldm217/tahutek.net
Sudo apt-get update & sudo apt-get install apt-fast
Usage:
Replace the original apt-get command with the apt-fast command, for example:
Apt-fast update
Apt-fast install fcitx