How to Fix Ubuntu Update Errors

ubuntu-logoIt happens quite often that we encounter errors while trying to run an update in Ubuntu. There are several type of errors and in this post we will see how to solve some of the most common errors encountered during update of packages in Ubuntu.

Error 1: E:Encountered a section with no Package: header, E: Problem with MergeList

Sometimes running the updates in the Update Manger results in the following error:

Could not initialize the package information.
An unresolvable problem occurred while initializing the package information.
Please report this bug against the ‘update-manager’ package and include the following error message:
‘E:Encountered a section with no Package: header, E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty_main_binary-amd64_Packages, E:The package lists or status file could not be parsed or opened.’

A similar error occurs while running the apt-get update command in terminal:

Reading package lists… Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty_main_binary-amd64_Packages
E: The package lists or status file could not be parsed or opened.

There is a one shot solution to the above errors. Open the terminal and run the following commands in the given order:

sudo rm -rf /var/lib/apt/lists/* 
sudo apt-get clean 
sudo apt-get update

Hope that solves the above mentioned problems. Now lets move on to another type of error.

Error 2:E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)

A very common error while installing an application or updating a package is following:

E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

The reason is quite obvious from the error itself “another process using it”. Which means another process is already using the mentioned directory (necessary for the application to be installed) through Synaptic Package Manager, Update Manger, terminal or Ubuntu Software Center.

The idea would be to look for another application which is being installed or update it. Wait for it to finish the installation or cancel it. If you cannot see the application then try running this command in the terminal to solve this error:

sudo rm /var/lib/apt/lists/lock

Error 3: The action would require the installation of packages from not authenticated sources

I faced a strange situation today when I ran the Update Manager in Ubuntu. It showed me a number of updates to be installed and when I clicked on Install Updates it showed me the following error:

The action would require the installation of packages from not authenticated sources

ubuntu-require-untrusted-packages
There could be several reason for this error:

  • Software is restricted by copyright or legal issues
  • The Software is from Canonical Partner and has not been added to Source List
  • The application has been installed form its source code
  • Missing public key of the application

If you do not know which is the root cause of error, then follow the instructions for each of them and then you can find it out. Lets see how to tackle these problem one by one:

(i) Software is restricted by copyright or legal issues

Run the Update Manager. And go to Settings as shown in the pic below:

ubuntu-update-manger-settings

Now here, go to the Ubuntu Software tab and make sure that Software is restricted by copyright or legal issues field is checked. Close the settings and install updates now.

ubuntu-synaptic-multiverse

(ii) The Software is from Canonical Partner and has not been added to Source List

In the Update Manager Settings, go to Ubuntu Software tab and include the Source Code for updates like in the pic below:

ubuntu-synaptic-canonical-settings

(iii) The application has been installed form its source code

In the Update Manger Settings, go to Ubuntu Software tab and check the Source Code option:

ubuntu-synaptic-source

(iv) Missing public key of the application

Open the terminal (Ctrl+Alt+T) and run the following command:

sudo apt-get update

Now wait till it finishes and see if you see something like this:

W: GPG error: http:/something.something Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXXXXXXX

Note down the numbers you see after NO_PUBKEY. This error is because the application’s public key has not been added. To solve the error use the following command in the terminal:

sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com XXXXXXXXXXXXXXXX

After adding the missing public key run the following command (again):

sudo apt-get update

I hope it helps solve your problem. Do provide us your feedback and if you are facing errors other than this do let us know. Comments section is all yours. Enjoy :)

Do you like what you read here?

Receive the latest update in your inbox.

29 Comments

  • Marxubuntu

     missing public keys : worked GREAT thank you, this has been an issue for me for quite sometime, Thanks Again, Awesome!!

    Reply

    • Abhishek Prakash

      That could be because either your net connection is down or the server from where you are trying to get the update….

      Reply

  • John Billot

    I winder if someone here could help please. 
    I have Ubuntu 11:10 with Gnome Shell and use KMyMoney (KDE) for my finances.
    The following occurred recently and would appreciate any help.
    John Billot
    Sorry, tried to upload a screen image of a failed Update to no avail.
    The Update Manager quotes as follows:
    “Requires installation of untrusted packages”Opening the “Details” shows:”kmymoney kmymoney-common libalkimia”The action would require the installation of packages from unauthenticated sources.
    “Changes for the versions:Installed version: 4.5.3-2Available version: 4.6.1-1ubuntu1~ppa1This update does not come from a source that supports changelogs.”

    Reply

    • Abhishek Prakash

      Hi John,
      First..sorry for replying late…
      Now.. about your problem..as you can see your softwares comes form a non-standard provider.. to include updates from such sources..Go to Update Manager->Settings->Software Sources.. and then choose Other Software Tab… here see if your software provide is listed.. check the box to include it in the updates..you can choose the option of “independent source”..Refer to pic no. 4 in this article for reference..

      Reply

  • Kaloyan Banev

    Very useful guide, thanks mate! I didn’t know how I run on this error but the first solution fix the problem.

    Reply

  • Aditya Bhatt

    Hello buddy, I am impressed with the solutions you’ve provided here. Its simply EXCELLENT !!

    Since last few months, I was struggling and not able to update my Ubuntu 12 version, and was thinking back of my mind to uninstall and go back to version 11 but once I run the “Error 1:” related solution, I wondered all my Ubuntu updates were working as earlier.

    Very Very Thanks a lot for this nice post and really helpful solution to community.

    Much appreciate !!

    Thanks for your time and efforts :)

    Reply

  • Kiki

    E:Encountered a section with no Package: header, E:Problem with MergeList /var/lib/apt/lists/be.archive.ubuntu.com_ubuntu_dists_precise-backports_multiverse_binary-amd64_Packages, E:The package lists or status file could not be parsed or opened.

    This problem occures every time I want to make an update. Could someone please help what to do? Because it’s the first time I will need to solve it by myself.

    Thanks.

    greetz Kim

    Reply

  • Maatthew

    AWESOME! I really appreciate you taking your time to help us with this. BLESS!

    The last step worked great for me, because I was unable to do a system update beacause of “spotify-client”..

    I added the public key and hit sudo apt-get update,

    Worked like a charm!

    Reply

  • ulatgg

    what’s going on?.. PLEASE HELP ME.get error like this.

    zul@buntu:~$ sudo apt-get install synaptic
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    You might want to run ‘apt-get -f install’ to correct these:
    The following packages have unmet dependencies:
    gstreamer0.10-plugins-bad : Depends: libflite1 but it is not going to be installed
    synaptic : Depends: libept1.4.12 but it is not going to be installed
    Depends: libvte9 (>= 1:0.24.0) but it is not going to be installed
    Recommends: rarian-compat but it is not going to be installed
    E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).

    zul@buntu:~$ apt-get -f install
    E: Could not open lock file /var/lib/dpkg/lock – open (13: Permission denied)
    E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

    Reply

  • Philip Kettering

    Okay, I’ll try and explain my problem. About a week ago, all was well. Wife had the PC most of the week while I was at work and don’t know if she clicked an update or something else accidentaly. The issue is I use Chromium & FireFox as the main browsers. Chromium will NOT downsize and Firefox no longer has the menu for downsizing, enlarging or closing (the one normally in the R upper hand corner). Also, on the operation bar, the browsers do NOT appear so you (like in windows) can quickly switch between views. Have tried updates and restarts. All but re-install.

    Thanks

    Reply