[SOLVED] Unable to get Exclusive Lock Problem While Launching Synaptic, /var/lib/dpkg/lock – open (11 Resource temporarily unavailable) Error

[ad#ad-1] I am using Ubuntu 10.04 Lucid Lynx Alpha and I encountered this while installing ltsp-server. The package being configured was ldm-server.

I was installing an application and Synaptic Package Manager just froze forever while configuring a package. I had to shut it down using sudo killall synaptic. Then, when I tried to launch t again, it would come up with “Unable to get Exclusive Lock” message. When I tried apt-get from Terminal, I got /var/lib/dpkg/lock – open (11 Resource temporarily unavailable).

I checked the processes by running “gksu gnome-system-monitor” from the run dialog, but could not find any packages related to apt or update. If you are facing the similar problem and if you find anything related to these, you should either stop the process from where it is running or kill them with gnome-system-monitor. I then killed update-notifier but that did not do it (that should not have done it anyways :)).

Then I just ran this in my terminal:

sudo rm /var/lib/dpkg/lock

i.e. I just removed /var/lib/dpkg/lock.
This did it. I was able to open Synaptic Again.

But again I received “Sub Process Pre Removable Script Returned Error Exit Status X” problem, but solved it:

  • Paras

    well i got the same problem as well. I looked at the software center and saw a few processes running. I closed them and i could download my updates..

  • Usrichcrimson

    Thanks this code is really very helpful

  • Thanks for this, partially worked for me. When I restarted Synaptic, I was asked to run the following (and restart):

    sudo dpkg –configure -a

    Hope this helps somebody.

    • Arjun

      i want to change the address to which the command  sudo dpkg –configure -a when run tries to connect to ? where do i change it?(eg. it connects to no. i want to change this address)

  • gudhel

    nice 1… it work for me, thanks..