Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is where it locks-up:

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

Even control-c does not stop it. I have to close the ssh session by closing the terminal.

I have tried two packages: openjdk-6-jdk and ecj From Javac.

What to do now ?

Thanks in advance for any help.

share|improve this question

I would advise you to install sun's (sun-java6-jdk for natty) official version.

I think the quality of openjdk really increased lately, but it's still a copy of the official distribution.

You may also try to install it from the command-line (sudo apt-get install [package]). It may give you more feedback on what goes wrong.

share|improve this answer
I am in the command line... I will try sun-java6-jdk... Question will it work for Thrift: and and Thanks for your time and help. – jnbdz May 27 '11 at 17:50
I tried to purge ecj from dpkg, but for some reason it does not work: dpkg: dependency problems prevent removal of ecj: ecj-gcj depends on ecj (>= 3.5.1-1). dpkg: error processing ecj (--purge): dependency problems - not removing Errors were encountered while processing: ecj – jnbdz May 27 '11 at 17:55

As Roalt said, install Sun Java.

1 - Go to Oracle Java Download

2 - Select Linux (self-extracting file) filesize: 20.6 MB

3 - Save the file to /home/YourUserName/Downloads

In Terminal, copy and paste the following commands

1 - cd /opt

2 - sudo mkdir java

Press Enter.

Type your password. You won't see anything, not even dots, this is normal. Press Enter.

3 - cd java

4 - sudo mkdir 32

5 - sudo mv ~/Downloads/jre-6u25-linux-i586.bin /opt/java/32

Press Enter.

6 - sudo chmod 755 /opt/java/32/jre-6u25-linux-i586.bin

7 - cd /opt/java/32

8 - sudo ./jre-6u25-linux-i586.bin

9 - sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/32/jre1.6.0_25/bin/java" 1

Press Enter.

Note: are you updating from a previous Java version, which you have removed manually? Then you'll need to execute the above command twice, because you'll get an error message the first time.

10 - sudo update-alternatives --set java /opt/java/32/jre1.6.0_25/bin/java

11 - mkdir ~/.mozilla/plugins

12 - sudo apt-get remove icedtea6-plugin

13 - rm ~/.mozilla/plugins/

14 - ln -s /opt/java/32/jre1.6.0_25/lib/i386/ ~/.mozilla/plugins/

Final check

Now close and restart Firefox or Chrome. Check if everything has succeeded. Type in the url bar of Firefox (not in the terminal!):


Press Enter.

And scroll down, until you see something approximately similar to this: Java(TM) Plug-in 1.6.0_25

All the commands are from Easy Linux Tips Project and I can confirm that they do work as I have followed these instructions when installing the latest version of Java

share|improve this answer
First I cannot find: jre-6u25-linux-i586.bin Second: I am using Ubuntu server. I don't have any browsers installed. I have been trying to install Thrift. But it seems impossible for some reason. – jnbdz May 27 '11 at 20:30
I have solved it! It seems there was a bug: Anyways... Thanks, you all. – jnbdz May 28 '11 at 4:14
up vote 0 down vote accepted

It seems there was a bug:


apt-get clean

share|improve this answer

Your Answer


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.