5

I'm a new user of ubuntu. It's been working fairly well so far. Today I've tried doing 'sudo apt-get update' and it's freezing after fetching data. This is the output:

sudo apt-get update 
Hit:1 http://archive.canonical.com/ubuntu xenial InRelease
Hit:2 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu xenial InRelease
Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]    
Hit:4 http://us.archive.ubuntu.com/ubuntu xenial InRelease                     
Hit:5 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease
Get:6 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [92.2 kB]
Fetched 187 kB in 0s (225 kB/s)  

Using sudo apt-get clean and then sudo apt-get update, I get the following issue:

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

Using sudo rm -rf /var/lib/apt/lists/lock and then sudo apt-get update I get a new issue:

** (appstreamcli:3466): WARNING **: Exception: Unable to get write lock on /var/cache/app-info/xapian/default: already locked
sudo fuser /var/cache/app-info/xapian/default 

shows nothing.

file /var/cache/app-info/xapian/default 

shows

/var/cache/app-info/xapian/default: directory   
9

3 Answers 3

0

Check out this link. I ran into the could not get lock issue the other day and resolved it with the same answer that Faheem Mitha used.

ps aux | grep apt

This will return a list of things that apt is doing with PIDs. Then run:

kill processnumber

or

kill -9 processnumber

You may or may not have to invoke sudo priveleges in order to kill the process depending on your setup.

0

A temporary fix for now is to simply delete everything under /var/cache/app-info/xapian/default. It appears to be the search index for apt, so it will have to be rebuilt, but no ill effects otherwise.

0

Yeah,I have the Same Problem, the Solve(I am not Sure it is) of mine is:

  1. Restart the System
  2. killall the relative Process
  3. sudo apt-get upgrade
  4. then you could install normally
  5. Done! It Works.
3

Not the answer you're looking for? Browse other questions tagged .