Synaptic Package Manager stuck in "runnung" mode.

Asked by johny q

Synaptic Package Manager promp says"
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.
E: _cache->open() failed, please report.

Update Manager gets stuck in "running" when trying to download updates.. I think these problems are related!

YELP!!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu yelp Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Please open a Terminal from the menu Applications->Accessories->Terminal and type:

sudo dpkg --configure -a
sudo dpkg -f install
sudo apt-get update
sudo apt-get upgrade

give your user password when requested, you don't see nothing when you type it, then press enter.

hope this helps

Revision history for this message
johny q (qwestj) said :
#2

I tried this, terminal says" dpkg: status area is locked by another process"

Revision history for this message
Randy LeJeune (lejeunerandy-fastmail) said :
#3

Use the "ps -aux | grep synaptic" command to find out the process id then issue the "kill" command to kill the process then try the above instructions.

Revision history for this message
johny q (qwestj) said :
#4

Do I use this command in the Terminal? thanx! Also, I'm not familiar with any"kill" command.. Can you providse any more detail? Thanx sooo much!!

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#5

I think is simply to reboot the pc and try the above command...

Hope this helps

Revision history for this message
Randy LeJeune (lejeunerandy-fastmail) said :
#6

Ok, sure. Yes, open up a terminal and do this. Let me give you an example. Right now I am running Pidgin, the instant messenging program. To get the process id (PID), I issue this command at a prompt:

ps -aux | grep pidgin

and my reslt is this:

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND

randy 30572 1.3 4.5 77096 23428 ? Ssl 14:33 0:01 pidgin
randy 30589 0.0 0.1 3012 768 pts/1 R+ 14:34 0:00 grep pidgin

You can see that my PID for pidgin is 30572, so to kill this process, I issue:

kill 30572

and then I issue the ps -aux | grep pidgin command once more. The process should have been killed. If not, you can try this:

kill -9 30572

the "-9" forces the process to terminate. Without the "-9" you allow the program to terminate and clean temporary files up, but the "-9" means "kill right this second!" The ps -aux | grep pidgin command means get a listing of all use processes and then take the output and serach for a string called "pidgin" . . . the second line is that of me doing the search so you can ignore that.

This should terminate your program then you can follow marcobras instructions from there (also at the terminal).

Let us know if this doesn't work.

Revision history for this message
johny q (qwestj) said :
#7

I don't have(on my keyboard) the font after ps -aux..It looks like a vertical straight line.. How do I make this character? Thanx..

Revision history for this message
Randy LeJeune (lejeunerandy-fastmail) said :
#8

It should be under the backspace key with the backslash (\) as the non-shift key. Its is not necessary actually, since you can just browse through the output of the ps command. I just added that so that you could filter your entries a bit.

Revision history for this message
johny q (qwestj) said :
#9

Here is my result:

Warning: bad ps syntax, perhaps a bogus ' - ' ? See http://procps.sf .net/faq html
john 5280 0.0 1.0 13652 5204 ? S 12:38 0:00 gksu /usr/sbin/synaptic
root 5281 0.8 6.1 52820 31844 ? Ss 12:38 0:04 /usr/sbin/synaptic
john 5334 0.0 0.1 2972 748 pts/0 R+ 12:47 0:00 grep synaptic

Sorry this took soooo long I had to physicaly type all info.!! Could'nt cut and paste what was written in terminal!! Thanx again!

Revision history for this message
Randy LeJeune (lejeunerandy-fastmail) said :
#10

First of all, if you have trouble cutting and pasting from a terminal, try redirecting the output to a file, like so:

ps -aux | grep synaptic > psout.txt

Then you can open psout.txt with gedit or some GUI editor.

Anyway, try issuing the following commands:

sudo kill 5280

and

sudo kill 5281

and look at your ps listing again. If the processes 5280 and 5281 are still running, then issue:

sudo kill -9 5280
sudo kill -9 5281

like I spoke of above.

That should kill all of your synaptic processes. Then you can try updating as marcobra suggests above.

Revision history for this message
johny q (qwestj) said :
#11

Ok I killed the 5280 and 5281,now I get:
Warning: bad ps syntax, perhaps a bogus ' - ' ? See http://procps.sf .net/faq html
john 5368 0.0 0.1 2976 752 pts/0 R+ 13:15 0.00 grep synaptic
 Then I do what marcobra said and I get :
dpkg: status database area is locked by another process

Still stuck!! Update Manager still will not let me install/upgrade or cancell items to upgrade/install!!
WOW!

Revision history for this message
Randy LeJeune (lejeunerandy-fastmail) said :
#12

Post the contents of:

/var/lib/dpkg/lock

and lets see if there are any locks remaining.

Revision history for this message
johny q (qwestj) said :
#13

I don't understand "post contents of" sorry!

Revision history for this message
johny q (qwestj) said :
#14

I've got to get my kid to swim lessons!! Thanx for your valuable time!! I'll be back later- Have a grrreat weekend!

Revision history for this message
Randy LeJeune (lejeunerandy-fastmail) said :
#15

Ok, that means look at that file and see what is inside of it, then post it here so I can examine it. To do that try this:

sudo cat /var/lib/dpkg/lock > lock.lst

Then open lock.lst with gedit and paste the contents of that file here so I can see if there are any locks preventing you from continuing.

Revision history for this message
johny q (qwestj) said :
#16

I wasn't able to open lock.lst..I did gedit, the lock.lst icon appeared on upper left tab area, but I couldn't open it..??
Maybe I tried to open it with wron command.. I typed:sudo gedit lock.lst ?? Thanx!!

Revision history for this message
Randy LeJeune (lejeunerandy-fastmail) said :
#17

Try this:

sudo gedit /var/lib/dpkg/lock &

This should cause gedit to open the file in question.

Revision history for this message
johny q (qwestj) said :
#18

Synaptic Manager is freed-up now!! Unfortunately, it gets stuck again as soon as I try to upgade programs in Update Manager..It gets stuck in "running" mode when it trys to send me Sun Java Terms of Agreement for updating 2 programs in Sun Java -6-bin & Java-6-jre!!
Jim writes:I know what the problem is. The Sun Java Documentation is the clue.

For some dumb reason, Ubuntu is allowed to ship everything but the Sun Java documentation. The Installer has a link to the documentation so it can install it once you manually download the documentation and put it in the /tmp folder and type sudo chown root:root <documentation file>

If you look at the details of the synaptic install it does mention this (but I agree that it is confusing).

You can get the Java documentation here for Java 5 (if that is what you are installing) here:

http://java.sun.com/javase/downloads/index_jdk5.jsp

You'll want the J2SE 5.0 Documentation (make sure to grab the English version).

If you are installing Java 6, you can get the documentation here:

http://java.sun.com/javase/downloads/index.jsp

You want the Java SE 6 Documentation

Save either of these to /tmp

Then switch to /tmp and type:

sudo chown root:root <name of the documentation file you downloaded>

Then go back to your synaptic installer session (or update session) and expand out the details, there should be a note about hitting Enter.

Do it now and the Sun Java installation will finish and stop hanging your installer.

I Respond:

Thanx!! I'm new to Ubuntu, so I understand some of the above..

I'm not sure how to "save to/tmp"

/tmp I assume is the terminal, but I'm not sure how to "save"..

Thanx!! This is not easy for a "newbie", but I'm getting an education, and it is very interesting!

It's not quite "fun" yet, but I'm working on it!! Thanx again!

Am I getting somewhere?? Thanx!!

Revision history for this message
Randy LeJeune (lejeunerandy-fastmail) said :
#19

The /tmp directory is the directory where your temporary files are stored. Type:

cd /tmp

to get there and have a look around.

Once there, try the:

sudo chown root:root <name of the documentation file you downloaded>

command . . . this changes the ownership of the file to the root user. Try running syaptica gain after that and tell me what you get.

This eventually does become fun! :P

Can you help with this problem?

Provide an answer of your own, or ask johny q for more information if necessary.

To post a message you must log in.