Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using Ubuntu Server.

When I do:

apt-get upgrade

it gets stuck on:

Setting up openjdk-6-jre-headless (6b20-1.9.7-0ubuntu1) ...

Why? And what can I do to stop it?

I tried removing it with apt-get... I get this error:

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

So then I tried this:

dpkg --purge openjdk-6-jre-headless

I got this:

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

The thing is I think my DB is using it... Not sure... I am using Cassandra with Thrift...

Yes, it's getting a bit more complex...

# dpkg --configure -a

I get:

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

Thanks again for any help.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

I've had little upgrade problems like this before.

two possibilities, try:

apt-get update

then

apt-get upgrade

Failing that, try

apt-get remove openjdk-6-jre-headless

Then

apt-get upgrade

then

apt-get install openjdk-6-jre-headless
share|improve this answer
    
Even when I try to remove ecj (javac) it gets stuck on: Setting up openjdk-6-jre-headless (6b20-1.9.7-0ubuntu1) ... –  jnbdz Jun 14 '11 at 4:45
    
The server actually crashes. I have to reboot every time... And some times multiple times. –  jnbdz Jun 14 '11 at 4:46

Cassandra is a Java application and depending on which version you are running it requires different Java packages. In the past it has required openjdk but I believe the newer version will accept sunJDK. You have to have one of them for it to work.

share|improve this answer
    
The problem is not at that level. The problem was with Amazon AWS EC2 package manager. I tried installing Javac on RackSpace and I did not have any problems. –  jnbdz Jun 28 '11 at 19:09

dpkg -C will audit your system for misconfigured or non-functioning packages, then recommend a solution.

You should try manually removing the top of the dependency tree, too: have you tried to remove ca-certificates-java? If that remove fails, you can remove its requirer, and so on and so forth.

As a last resort: If you run dpkg with the --force-depends flag, all dependency errors automagically turn into warnings. Thereby allowing you to hose your system, of course; use with caution. Certainly include the --dry-run option first to check that what's being done is what you want.

share|improve this answer
    
Thank you @Michael Lowman for your input. But I have since then switch to RackSpace. It seems that there was a problem with Amazon Package manager and that was why I couldn't install Javac properly. But still thank you for your tips. –  jnbdz Jun 28 '11 at 19:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.