Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
I would try doing killall software-center. That should terminate software center. You may need to killall dpkg if there's still the "installation" stuffs in the background. – The Lord of Time Jun 5 '12 at 13:43
Tired this too. But no luck. – aneal Jun 5 '12 at 14:24
try adding the -9 argument to them, so its killall -9 software-center and killall -9 dpkg – The Lord of Time Jun 5 '12 at 14:25

5 Answers

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.

share|improve this answer

For a similar problem, I removed and reinstalled the software-center and killed dpkg, then ran sudo apt-get update. After that I upgraded the packages.

share|improve this answer
2  
Do you mean something like sudo pkill dpkg ? – belacqua Nov 20 '12 at 0:23

Make sure there isn't a dialog window somewhere that needs your input to allow the installation to proceed.

In a similar situation, you see, kill -9 worked for me. But then when I started Ubuntu Software Center again it was still stuck in the same spot. Until I closed all the open windows and saw that it was waiting for me to enter an answer. Duh. Software then finished installing.

share|improve this answer

Try to search for and terminate the /usr/bin/dpkg process:

Gabriel@UMWC:~$ ps ax | grep dpkg
 2058 pts/0    SNs+   0:00 /usr/bin/dpkg --status-fd 14 --configure -a --force-confdef --force-confold
 2061 pts/0    SN+    0:00 /bin/sh /var/lib/dpkg/info/nautilus-dropbox.postinst configure 
 2275 pts/2    S+     0:00 grep --color=auto dpkg
Gabriel@UMWC:~$ sudo kill 2058
share|improve this answer

You could try a reboot.

It would solve your problem.

share|improve this answer
Software Center will just pick up where it left off, on most systems. – Klikini Apr 27 at 3:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.