I just managed to install the latest version of Ubuntu on my PC, and it was like a smooth ride. My modem and other things worked smooth, and updating was a charm. Just a few commands and I’m done. I like the way this kinda command line updating in Linux. I really love it, and I’m exploring more commands and Googling a lot of stuff.
I wanted to install Epiphany (the name tempted me to try it), so used Synaptic and marked it for installation. But something was wrong.
I got the error message:
“Unable to get exclusive lock – This means that another package handler (like apt-get or aptitude) is already running. Please close that application first”
I went around, and found the solution. Just thought of writing them down here so that any of you facing this rather simple error can get it solved.
When you’re getting the ‘Unable to get exclusive lock’ message while trying to update, it actually means that there’s another instance of the package update manager running. Just cancel the other one, and then proceed this one.
If you can’t find any ‘visible signs’ of an update happening, it’s probably that some update process happening behind, something that’s unfinished.
Try the following commands:
$apt-get -f update
The above commands will clear the cache and terminate any unfinished business.
Now you can restart the update process (restart Synaptic or else try the command apt-get again for the update to begin).
If you still get the same error, use the command:
This will display a list of running processes.
If you see some update process running in the background use the command
$sudo kill <process number>
to kill the process. This will do.
You feel a lot happy when you solve a problem yourself Let me know if I’ve written something incorrect here because I’m doing this commands stuff practically for the first time.