I cannot use Adept because of another process is using the packaging system :-(

Asked by sarton85

For the first time, i'm not able to use Adept, because of another running process. Adept is giving the following note:

"You will not be able to change your system settings in any way (install, remove or upgrade software), because another process is using the packaging system database (probably some other Adept application or apt-get or aptitude). Please close the other application before using this one."

I'm sure I didin't start another program which could be using Adept. Can anybody help out? I have also been searching for apt-get or aptitude in KsysGuard, but can't find it.

Thank you in advance!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
sarton85
Solved:
Last query:
Last reply:
Revision history for this message
Torsten Spindler (tspindler) said :
#1

Is there possibly another adept or synaptic open? If rebooting is an option, please try.

Revision history for this message
sarton85 (sarton85) said :
#2

There is no other Adept or Synaptic running. I rebooted my comp for several times, but the problem is still there.

The only process which is constantly running and which could possibly be the problem is "apt-index-watch", but I don't have the rights to kill this process.

Revision history for this message
Paolo Sammicheli (xdatap1) said :
#3

let's check who is locking apt.

Boot your system and then type in a console:

sudo lsof /var/lib/dpkg/lock

Tell us the output of that command.

Bye

Revision history for this message
sarton85 (sarton85) said :
#4

Something has changed now, but it's still not right.

When I start Adept now it is loading for a longer time as usual and it doesn't ask for my root password.

After the loading time it seems to do nothing anymore.

When I start Adept again after trying it the first time, I am being asked for my password. Adept is then starting and giving the same error as before.

Revision history for this message
Paolo Sammicheli (xdatap1) said :
#5

So, probably the problem is that the first adept is taking db lock.

type in a console:

ps -ef | grep adept

and report the output

Revision history for this message
sarton85 (sarton85) said :
#6

When I use the command, my console is giving the following output:

1000 5410 1 1 16:48 ? 00:00:02 adept_notifier
1000 5444 5349 0 16:48 ? 00:00:00 kdesu -u root -c kdesu adept_manager
1000 5514 5495 0 16:51 pts/3 00:00:00 grep adept

In fact nothing changes. Adept is still having the some problem as before.

Today I discovered a "Lock" folder in my /var/ directory. I believe this folder could be locking my Adept. The problem is that I cannot remove it, even when I'm logged in as root.
There are no files or sub folders in it.

Can you tell me if I'm on the right track and how I can remove this folder?

Thanx

Revision history for this message
Torsten Spindler (tspindler) said :
#7

In your output the second line gives a hint on the problem:
1000 5444 5349 0 16:48 ? 00:00:00 kdesu -u root -c kdesu adept_manager

You mention that it didn't ask for a password. Can you please check all desktops and windows if there isn't a password dialog hidden?

Revision history for this message
sarton85 (sarton85) said :
#8

Adept is now asking me for a password every time I start it. I checked all my windows and desktops, but I cannot find any hidden password.

Can you explain what hint the second line gives? I'm not very good in this code language.

Revision history for this message
Torsten Spindler (tspindler) said :
#9

This part of the second line:
kdesu -u root -c kdesu adept_manager

says that you're system is running a program called 'kdesu' and wants to run 'kdesu adept_manager'. 'kdesu' is supposed to ask you for your password and then start adept_manager with superuser priviliges (root).

As it now asks you for your password everytime, can you please append the output of 'ps aux | grep kdesu'? Also, can you append the out of 'df'.

Revision history for this message
sarton85 (sarton85) said :
#10

The output of 'ps aux | grep kdesu' is:

1000 4591 0.0 0.5 16924 2904 ? S 17:15 0:00 /usr/bin/kdesud
1000 4677 0.0 0.1 2808 752 pts/1 R+ 17:17 0:00 grep kdesu

The output of 'df' is:

/dev/hda2 15116868 4712324 9636640 33% /

varrun 257944 80 257864 1% /var/run

varlock 257944 0 257944 0% /var/lock

procbususb 10240 124 10116 2% /proc/bus/usb

udev 10240 124 10116 2% /dev

devshm 257944 0 257944 0% /dev/shm

lrm 257944 17580 240364 7% /lib/modules/2.6.17-10-generic/volatile

/dev/hda1 94928928 38781824 56147104 41% /media/hda1

/dev/hdc 693322 693322 0 100% /media/cdrom0

Thank you for the help! This is all like Chinese for me.

Revision history for this message
Torsten Spindler (tspindler) said :
#11

After a reboot, can you please try and see if this works from the commandline or via alt-f2:

kdesu -u root -c kdesu adept_manager

As another alternative, try from the command line
sudo aptitude update; aptitude upgrade

As Paolo wrote above, if it doesn't work, run
sudo lsof /var/lib/dpkg/lock

Revision history for this message
sarton85 (sarton85) said :
#12

The output of 'kdesu -u root -c kdesu adept_manager' is:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kdesu: cannot connect to X server :0.0

I also did the aptitude upgrade, but it makes no sense for Adept to work.

Revision history for this message
Torsten Spindler (tspindler) said :
#13

As aptitude works, so no other process is locking the system. Probably something is wrong with your KDE setup then. Please try either of the following
1) Add another user and try adept from his account
2) Move your .kde and .config files away. For this logout of KDE, switch to a virtual console (ctrl-alt-f1), logon and type
$ mv .kde .kde-away
$ mv .config .config-away
Switch back to X (ctrl-alt-f7), login and try adept again.

Revision history for this message
Best sarton85 (sarton85) said :
#14

Adept is working again, because I have just reinstalled my complete system, which was the best thing to do in my case.

Any way, Paolo, Torsten, thanx for all the help!

Revision history for this message
raydeen (raydeen2k) said :
#15

I just had a similar problem and here's how I fixed it. Apparently in one of my update/install frenzies, a program had failed to install or configure itself properly (speech synth for emacs). I got this prompt from Adept:

dpkg --configure -a

I added sudo to the beginning for good measure and ran this from a terminal prompt. It completed the setup of the program that was in limbo and I was able to do updates again. Hope this helps future users.

Revision history for this message
Virion (virionnw) said :
#16

raydeen:
Thanks for the post, that was exactly what happened to me and this solved my issue. Turns out when I was installing java for Firefox it errored since it tried to install before completing the Firefox install. After following your recommendation it finished properly and my issue went away.

Revision history for this message
Nathelion (ossianmogensen) said :
#17

I had exactly the same problem, and the aforementioned line fixed it for me as well.

Revision history for this message
Magnus Grander (maggrand) said :
#18

Many thanks. It helped me too.

Revision history for this message
Tzolis (tzolis) said :
#19

Me too!!! I started reading the post and i was just about to reinstall Kubuntu just for that.
Therefor you understand how helpful THAT was. Thanks again.