Update help Kubuntu 7.04 Fiesty Fawn

Stew Schneider stew.schneider at gmail.com
Mon Aug 6 18:38:11 UTC 2007


On 8/6/07, Karl <karlok at fastmail.fm> wrote:
>> Some process must have crashed, leaving the packaging database locked.
>> To unlock it, use this command:
>>
>> sudo rm /var/lib/dpkg/lock
>>
>> Karl
> Farid Ansari wrote:
>> Hi Karl,
>> This command does not work.
>> How do I exit all packaging systems like Adept, apt-get and aptitude.
>>     
It would be a bad thing to have two processes trying to update the 
system at the same time. To prevent this from happening, (K)ubuntu 
creates a "lock file" named /var/lib/dpkg/lock and another named 
/var/lib/apt/lists/lock when an update process runs. The idea is that a 
new update process would first look to see if the lock file is there. If 
it is, it should bail out with just the error message you are getting. 
That's the idea, anyway, but on my system, /var/lib/dpkg/lock is present 
whether or not I'm  running an update process. That makes no sense, so I 
went looking. Here's what I found:

> Hi Rodney - 
> First make sure you don't have aptitude, apt or dpkg or dselect, or
> synaptic, or gnome-apt etc etc in the middle of something somewhere on
> another login/console.
> The remove the lock files...
> ok lets see if I can remember all of them.
> rm /var/cache/apt/archives/lock
> rm /var/lib/aptitude/lock
> rm /var/lib/dpkg/lock
> rm /var/lib/apt/lists/lock
> I've got a hunch there might be another one - these  seem to work for me
> 50% of the time though - Disclaimer - I really don't know the
> consequences of doing this, it just seems to fix the problem for me
> Good luck 
> Glenn
HTH
stew




More information about the kubuntu-users mailing list