![无法升级软件包,它卡在 openjdk-6-jre-headless 上](https://linux22.com/image/810181/%E6%97%A0%E6%B3%95%E5%8D%87%E7%BA%A7%E8%BD%AF%E4%BB%B6%E5%8C%85%EF%BC%8C%E5%AE%83%E5%8D%A1%E5%9C%A8%20openjdk-6-jre-headless%20%E4%B8%8A.png)
我正在使用 Ubuntu Maverick(服务器)。
当我跑步时:
apt-get upgrade
它卡在了:
Setting up openjdk-6-jre-headless (6b20-1.9.7-0ubuntu1) ...
为什么?我该怎么做才能阻止它?
我尝试用它删除它apt-get
但出现此错误:
E:dpkg 中断,您必须手动运行“sudo dpkg --configure -a”来解决问题。
因此我尝试了这个:
dpkg --purge openjdk-6-jre-headless
我懂了:
dpkg: dependency problems prevent removal of openjdk-6-jre-headless:
openjdk-6-jre-lib depends on openjdk-6-jre-headless (>= 6b17).
ca-certificates-java depends on openjdk-6-jre-headless (>= 6b16-1.6.1-2) | java6-runtime-headless; however:
Package openjdk-6-jre-headless is to be removed.
Package java6-runtime-headless is not installed.
Package openjdk-6-jre-headless which provides java6-runtime-headless is to be removed.
ca-certificates-java depends on openjdk-6-jre-headless (>= 6b16-1.6.1-2) | java6-runtime-headless; however:
Package openjdk-6-jre-headless is to be removed.
Package java6-runtime-headless is not installed.
Package openjdk-6-jre-headless which provides java6-runtime-headless is to be removed.
dpkg: error processing openjdk-6-jre-headless (--purge):
dependency problems - not removing
Errors were encountered while processing:
openjdk-6-jre-headless
问题是我认为我的数据库正在使用它...不确定...我正在将 Cassandra 与 Thrift 一起使用...
是的,它变得有点复杂...
# dpkg --configure -a
我得到:
dpkg: dependency problems prevent configuration of openjdk-6-jre:
openjdk-6-jre depends on openjdk-6-jre-headless (>= 6b20-1.9.7-0ubuntu1); however:
Package openjdk-6-jre-headless is not configured yet.
dpkg: error processing openjdk-6-jre (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
dpkg: dependency problems prevent configuration of libaccess-bridge-java:
libaccess-bridge-java depends on default-jre | openjdk-6-jre | sun-java6-jre; however:
Package default-jre is not installed.
Package openjdk-6-jre is not configured yet.
Package sun-java6-jre is not installed.
dpkg: error processing libaccess-bridge-java (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of icedtea-6-jre-cacao:
icedtea-6-jre-cacao depends on openjdk-6-jre-headless (= 6b20-1.9.7-0ubuntu1); however:
Package openjdk-6-jre-headless is not configured yet.
dpkg: error processing icedtea-6-jre-cacao (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libaccess-bridge-java-jni:
libaccess-bridge-java-jni depends on libaccess-bridge-java (>= 1.26.2-5); however:
Package libaccess-bridge-java is not configured yet.
dpkg: error processing libaccess-bridge-java-jni (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
openjdk-6-jre
libaccess-bridge-java
icedtea-6-jre-cacao
libaccess-bridge-java-jni
再次感谢任何帮助。
答案1
这实际上是 EC2 上 t1.micro 实例的一个众所周知的错误
https://bugs.launchpad.net/ubuntu/+source/linux-ec2/+bug/634487
请注意,这个问题已在 US-WEST-2 中修复:
https://bugs.launchpad.net/ubuntu/+source/linux-ec2/+bug/634487/comments/69
答案2
好的,我知道这是一个老问题,但是我在一个系统上遇到了它(显然有一段时间没有修补了),最后我使用以下命令使它正常工作:
dpkg --force-all -P openjdk-6-jre-headless
apt-get update
apt-get -f install
(--force-all
很重要)之后,我可以升级系统