Ubuntu

無法升級我的 Ubuntu 伺服器,它卡在 openjdk-6-jre-headless

  • June 28, 2011

我正在使用 Ubuntu 伺服器。

當我做:

apt-get 升級

它卡在:

設置 openjdk-6-jre-headless (6b20-1.9.7-0ubuntu1) …

為什麼?我能做些什麼來阻止它?

我嘗試使用 apt-get 刪除它…我收到此錯誤:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

所以我嘗試了這個:

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

再次感謝任何幫助。

我以前很少遇到這樣的升級問題。

兩種可能,試試:

apt-get update

然後

apt-get upgrade

做不到,試試

apt-get remove openjdk-6-jre-headless

然後

apt-get upgrade

然後

apt-get install openjdk-6-jre-headless

Cassandra 是一個 Java 應用程序,根據您執行的版本,它需要不同的 Java 包。過去它需要 openjdk,但我相信較新的版本會接受 sunJDK。您必須擁有其中一個才能使其正常工作。

引用自:https://serverfault.com/questions/280116