PDA

View Full Version : Unable to install packages



Mark_Jaffe
April 14th, 2015, 03:42 AM
Running Trusty 14.04.1, when I try to install I get message:


mjaffe@mjaffe-ThinkCentre-M51:~/Development$ sudo apt-get install git-core
[sudo] password for mjaffe:
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?

Looking at the (edited) process list, I see some likely suspects:

root 1051 1 0 Apr11 ? 00:00:00 anacron -s


root 1848 1051 0 Apr11 ? 00:00:00 /bin/sh -c run-parts --report /etc/cron.daily
root 1849 1848 0 Apr11 ? 00:00:00 run-parts --report /etc/cron.daily
root 1859 1849 0 Apr11 ? 00:00:00 /bin/sh /etc/cron.daily/apt


root 2483 1859 0 Apr11 ? 00:07:01 /usr/bin/python3 /usr/bin/unattended-upgrade
root 2935 2483 1 Apr11 ? 00:58:41 /usr/bin/python3 /usr/bin/unattended-upgrade


root 15980 2935 0 Apr11 ? 00:00:00 /usr/bin/dpkg --status-fd 8 --configure emacsen-common:all emacs23-common:all libc-dev-bin:i386 linux-libc-dev:i386 libc6-dev:i386 libc6-dbg:i386 emacs23-bin-common:i386 libfreetype6
root 15981 15980 0 Apr11 ? 00:00:00 /bin/sh /var/lib/dpkg/info/emacsen-common.postinst configure 1.4.22ubuntu1
root 15985 15981 0 Apr11 ? 00:00:00 /usr/bin/perl -w /usr/lib/emacsen-common/emacs-package-install --postinst emacsen-common
root 15988 15985 0 Apr11 ? 00:00:00 [emacs-package-i] <defunct>
root 15995 15985 0 Apr11 ? 00:00:00 /bin/sh /usr/lib/emacsen-common/packages/install/emacsen-common xemacs21
root 15999 15995 0 Apr11 ? 00:00:00 xemacs21 --no-init-file --no-site-file -batch -f batch-byte-compile /etc/xemacs21/site-start.d/00debian-vars.el /usr/share/xemacs21/site-lisp/debian-startup.el

root@mjaffe-ThinkCentre-M51:~# uptime
19:17:22 up 2 days, 5:09, 1 user, load average: 0.00, 0.05, 0.06

What can I do to fix this?

Bashing-om
April 14th, 2015, 04:01 AM
Mark_Jaffe; Hi !

In this case :


E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

Does it apply that another instance of the package manager is open ? Only one may be active at any given time - apt, dpkg, synaptic, Software Center; any of them running in another console ?.
Close all out and back out of everything and reboot the system

does apt behave after the reboot as expected ?




could be as simple as

Mark_Jaffe
April 14th, 2015, 05:36 AM
The update is being controlled by cron

Mark_Jaffe
April 14th, 2015, 05:52 AM
After reboot I had to do dpkg --configure -a
Now it is OK

Mark_Jaffe
April 14th, 2015, 05:57 AM
No, actually. Not OK. Problems with 'dpkg --configure -a'
Errors were encountered while processing:
emacsen-common
xemacs21-support
emacs23-common
xemacs21-mule
xemacs21
emacs23-bin-common
xemacs21-bin
emacs23

How does this get fixed?

Bashing-om
April 14th, 2015, 07:59 PM
Mark_Jaffe; Hey ;

I would consider re-configuring 'emacs' or perhaps better might be to RE-install emacs.
Remember to update/upgrade prior to the repair.



ain't no step for a stepper