Skip to content
Advertisement

Error ubuntu apt-get update [closed]

When i try to apt-get update its giving me this error

E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource 
temporarily 
unavailable)
E: Unable to lock directory /var/lib/apt/lists/

First of all, i’m root on the system

What i tried?

  1. Rebooting the server

  2. sudo dpkg –configure -a

  3. sudo mv /etc/apt/sources.list.d/medibuntu.lis /etc/apt/sources.list.d/medibuntu.list

Any solution?

Advertisement

Answer

Remove your /var/lib/apt/lists/lock file and force package reconfiguration.

sudo rm  /var/lib/apt/lists/lock
sudo dpkg --configure -a

This should work.

You can also try: You can delete the lock file with the following command:

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

You may also need to delete the lock file in the cache directory

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

After that, try opening Synaptic again.

Do the following

sudo apt-get clean
sudo apt-get install -f
sudo apt-get update

After that reinstall it

Search for Programs and Updates Change Download from: Main server On the Other Programs tab Activate Caninical Partners and leave all others disabled Update system Then add your PPAs one by one and update if problems are disabled, if there are no problems leave it enabled Finally in terminal: sudo apt-get update && sudo apt-get upgrade

Advertisement