Synaptic GUI non-existent.Can't install anything

Asked by darshan

I was just working on Synaptic when unexpectedly my mouse and Keyboard stopped responding.I did a reboot,but the next time I booted into Ubuntu and clicked on Synaptic it just wouldn't start.No GUI,no window nothing and when I try installing from the command line,I get

E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

Any solutions

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu synaptic Edit question
Assignee:
No assignee Edit question
Solved by:
Jeremy Visser
Solved:
Last query:
Last reply:
Revision history for this message
Mathias Uebelacker (muebelacker) said :
#1

Hello,

please open a termina and enter ps -u yourusername and the post the output here.
br
Mathias

Revision history for this message
darshan (zsdburman) said :
#2

THANKS MATHIAS
I just rebooted with another Kernel(2.6.15.)instead of (2.6.16) and Everything's working fine.

Actually I cooked up a little script for saving apt local deb packages to a directory of my choice(/media/Storage/debs) and make a repository.Here /home/darshan/bin/upgrade is just a reference file for duplicating permissions.The apt packages in cache are removed after copying.IMPORTANT****I own the /var/cache/apt/archives folder****

sudo chown -R --reference=/home/darshan/bin/upgrade /var/cache/apt/archives
cp --recursive --update -v /var/cache/apt/archives/ /media/Storage/debs
cd /var/cache/apt/archives
rm *.deb
cd /media/Storage/debs/archives
sudo dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
sudo apt-get update
rmdir partial
rm lock
CAN THIS BE THE CAUSE OF ANY PROBLEM?MY INSTICTS DON't AGREE,BUT I COULD HAVE EASILY MESSED SOMETHING UP

I've added ***deb file:/media/Storage/debs/archives ./*** as a source which I believe to be correct syntactically
However when the last third line executes,*sudo apt-get update*the local repository is ignored.
So when I try and install jre,it tries for online sources rather than local repos.Can I set a preference somehow for local repos ?
The script runs just fine and does what it is supposed to do except
I don't get to have local files a higher priority over online software channels

SO ,There can be two things
(1)THERE IS SOMETHING WRONG WITH THE SCRIPT,especially,in updating the local source repo
(2)By default,there is a tendency in Synaptic to give online repos a go rather than local ones.IF SO, THIS NEEDS A SOLUTION TOO,because then it's frustrating to have debs piled up in your PC and the package manager won't touch them

Revision history for this message
Best Jeremy Visser (jeremy-visser) said :
#3

The message:

E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

is caused because another program that uses the package system is running. Make sure you're not already running Synaptic or apt-get in the background.

Also, the system periodically checks for updates. While doing this, it triggers the lock that you're experiencing. Within ten minutes, it should have finished.

If you still receive the message, you can try an assortment of these commands to try and get rid of the locks:

sudo killall synaptic
sudo killall apt-get
sudo killall dpkg

Revision history for this message
darshan (zsdburman) said :
#4

Thanks Jeremy Visser, that solved my question.