while upgrading packages getting error failed to fetch gstreamer1.0-plugin | Hash Sum Mis
Just remove all the content of /var/lib/apt/lists
directory:
sudo rm -rf /var/lib/apt/lists/*
then run:
sudo apt-get update
This is a known issue, and is exacerbated for clients behind proxy caches. Some large organisations and ISPs (especially in remote parts of the world) have transparent caches of which you may not be aware.
The fundamental issue is that the apt repository format is subject to race conditions when a mirror is updated. This problem particularly affects repositories that change rapidly, such as the development release.
You can track progress on the fix for this in this bug (please mark yourself as "affects me too" in the bug) and this blueprint. But be aware that it is a complex issue and may take more than one release to resolve.
The easiest way to fix this is:
sudo apt-get clean
sudo apt-get update
The only solution that worked for me is from unix.stackexchange.
It happens because there's a known bug it apt, and the solution is to update with a different compression method, so the files load correctly and the checksum succeeds.
Give this a try:
sudo rm -rf /var/lib/apt/lists/partial
sudo apt-get update -o Acquire::CompressionTypes::Order::=gz
(thanks @brook_hong from the comments for the rm part)
I still had the problem after removing the directories and doing sudo apt-get update
.
Only the following step solved my problem:
sudo sed -i -re 's/\w+\.archive\.ubuntu\.com/archive.ubuntu.com/g' /etc/apt/sources.list
I don't know if this is the right way of fixing it...
I've found the solution here.