In this article you will learn how to fix some common update errors that occur frequently when you try to update your Ubuntu version. Fortunately the solutions are easy to implement. So let’s get started.
Error with “Hash sum Mismatch” :
When checking for updates, you might end up getting a “Failed To Download Repository Information” error.
This problem affects particularly rapidly changing repositories, such as the development release.
In order to fix this issue, you would just need to remove all the content of the directory /var/lib/apt/lists. Run the following command in the terminal :
sudo rm -rf /var/lib/apt/lists/*
then run:
sudo apt-get update
Problem with MergeList error :
It is one of the most frequently occurring errors during an Ubuntu update (sudo apt-get update not working|sudo apt update not working for instance ). It can happen when using both the sudo apt-get update in terminal and Ubuntu Update Manager. The error text might look similar to the following:
E:Encountered a section with no Package: header,
E:Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise_universe_binary-i386_Packages,
E:The package lists or status file could not be parsed or opened.
Issue the following commands to fix the problem:
sudo rm -r /var/lib/apt/lists/*
sudo apt-get clean && sudo apt-get update
“Failed to Download Repository Information” Error :
This is a rather generic error that can pop up for any kind of error during an Ubuntu update. You might have added a PPA which is not responding or is no longer available. It might look like the following :
E:Unable to parse package file /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_multiverse_i18n_Index (1)
If this a PPA problem, you would just need to identify the PPA that is failing and remove it from sources file.
Read: How to speed up Linux
To fix this, just issue the commands below like you did above:
sudo rm -rf /var/lib/apt/lists/*
then run:
sudo apt-get update
Error “Failed to download package files error”
This can be solved easily by modifying the software sources to Main server.
Read: How to install and uninstall applications in Ubuntu ? A Beginner’s guide
It’s simple: just open : Software & Updates, go to download from and change download server to main server .
This change will make future downloads slightly slower, due to the fact the main server is busier than a local server. This should provide more stability and a longer up-time.
Could not get lock /var/cache/apt/archives/lock
This error occurs when APT is being used by another program. In case an installation from Ubuntu Software Center is ongoing and at the same time you are running apt in the terminal, this error can pop up and might look similar to the output below:
E: Could not get lock /var/cache/apt/archives/lock – open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/
Since you can close the software update once it completed so that the lock gets released. If the problem persists however, issue the following commands:
sudo rm /var/lib/apt/lists/lock
Read: How to fix ‘E: Could not get lock /var/lib/dpkg/lock’ Error in Ubuntu
If the command above did not solve this problem, try the command:
sudo killall apt-get
Partial upgrade error
When installing updates in the terminal, you might encounter this upgrade error :
You may want to execute the command below to try to fix this error:
sudo apt-get install -f
Error while loading shared libraries
This is rather an installation error and not an update error. In case you are trying to install a program directly from the source code, this error might pop up:
Read: How to fix high memory usage in Linux
error while loading shared libraries:
cannot open shared object file: No such file or directory
To fix this issue, try to issue the following command:
sudo /sbin/ldconfig -v
GPG error: The following signatures couldn’t be verified
This isn’t much of an error but rather a small configuration issue. It used to occur quite frequently with IGD( Intel Graphics Drivers ) when trying to add the PPA. The error might look similar to the output below :
W: GPG error: http://repo.mate-desktop.org saucy InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 68980A0EA10B4DE8
The solution would be is to look up the public key that was not available from the remote server. Copy the key from the message and run the following command:
sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 68980A0EA10B4DE8
Once the key has been retrieved and added, issue an update again and you should be good to go.
Read: How to use the APT command on Ubuntu/Debian Linux systems
BADSIG error
The BADSIG error might resemble the output below :
W: GPG error: http://download.virtualbox.org lucid Release: The following signatures were invalid: BADSIG 54422A4B98AB5139 Oracle Corporation (VirtualBox archive signing key)
To fix this error, run the following commands in the terminal:
sudo apt-get clean
cd /var/lib/apt
sudo mv lists oldlist
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update
If the issue occurs again however, open Nautilus as root and navigate to var/lib/apt then delete the “lists.old” directory. Afterwards, open the “lists” folder and remove the “partial” directory. Finally, run the above commands again.
If this does not work, copy the character shown in bold in the error message above and then issue the command below like you did in the previous section :
sudo apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 54422A4B98AB5139
Another simpler way to fix the BADSIG GPG errors is via Y PPA manager.
First you would need to install it via the following commands :
sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager
Then open it up by invoking :
And click on Advanced and then select Fix all GPG Badsig errors:
If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.