本次通过ssh远程安装软件过程中出现了断网,造成再次安装它时提示:
root@netren:~# apt-get install sun-java6-jre
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavai lable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another proc ess using it?
这个问题很显然是上次安装未完成造成的,ssh重新登录无法再回到原来的界面.要解决此问题方法有几种:
方法一、
1、ps aux #找出相关进程ID
www-data 22193 0.0 0.2 33024 4872 ? S Apr15 0:00 /usr/sbin/apache2 -k start
root 28226 0.0 0.9 23788 19528 ? S Apr15 0:02 apt-get install sun-java6-jr
root 28481 0.0 0.5 13632 10912 pts/1 Ss Apr15 0:00 /usr/bin/dpkg --status-fd 22 --unpack --auto-deconfigure /var/cache/apt/archives/sun-java6-jre_6.24-1bu
root 30806 0.0 0.1 10444 3208 ? Ss Apr15 0:00 sshd: root@pts/2
root 30887 0.0 0.0 4592 1904 pts/2 Ss Apr15 0:00 -bash
root 28487 0.0 0.3 10536 7496 pts/1 S Apr15 0:00 /usr/bin/perl -w /usr/share/
root 28494 0.0 0.0 1832 540 ? S Apr15 0:00 /bin/sh -e /var/lib/dpkg/tmp.ci/preinst install
root 28496 0.0 0.0 4764 1488 ? R Apr15 0:02 whiptail --backtitle Package configuration --title Configuring sun-java6-jre --output-fd 11 --msgbox Op
2、Kill xxxx #关掉进程ID
3、运行root@netren:~# dpkg --configure -a 否则会提示:
E: dpkg was interrupted, you must manually run
拥有帝国一切,皆有可能。欢迎访问phome.net''sudo dpkg --configure -a'' to correct the problem.
>>>阅读全文
拥有帝国一切,皆有可能。欢迎访问phome.net |