Ubuntu – Ubuntu Software Center does not proceed from applying changes

12.04software-center

I have a problem with Ubuntu software center. It is "Searching" and "applying changes" for long period of time. I tired to cancel by clicking cross(X) mark. However, it is now stuck at "cancelling". It won't let me download any new application even from terminal i guess.

neal@neal-G50VT:~$ sudo apt-get install gnome-tweak-tool
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?
neal@neal-G50VT:~$ sudo dpkg --configure -a
dpkg: error: dpkg status database is locked by another process

There are similar question here, but with no answers:

Software Center stuck for Dropbox

Software Center freezes during “applying changes

Best Answer

I had the same issue too. However, I tried the following. Ran

sudo lsof /var/lib/dpkg/lock

From there I identified the PID of the process causing my dpkg to lock. Then I did

sudo kill -TERM <PID>

Next, I did a

 sudo dpkg --configure -a

and waited for the result... after that i did a regular

sudo apt-get update && sudo apt-get upgrade

Hope it will work for you too.

Related Question