4

I am trying to install the java re and java dk in Ubuntu 10.04 LTS. I tried using this link ubuntu help java. I used the first link for installing and clicked yes. I was warned that some of the packages were not able to be downloaded. I click to proceed, and afterwards the following message was brought up as an error having occurred:

W: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/o/openjdk-6/openjdk-6-jre-lib_6b20-1.9.10-0ubuntu1~10.04.3_all.deb
  404  Not Found [IP: 91.189.92.167 80]


W: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/o/openjdk-6/openjdk-6-jre-headless_6b20-1.9.10-0ubuntu1~10.04.3_i386.deb
  404  Not Found [IP: 91.189.92.167 80]


W: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/o/openjdk-6/icedtea-6-jre-cacao_6b20-1.9.10-0ubuntu1~10.04.3_i386.deb
  404  Not Found [IP: 91.189.92.167 80]

I went to the terminal and used java -version to get this output:

alex@alex-laptop:~$ java -version
The program 'java' can be found in the following packages:
 * gcj-4.4-jre-headless
 * openjdk-6-jre-headless
 * cacao
 * gij-4.3
 * jamvm
Try: sudo apt-get install <selected package>

This was the same output as before though. I subsequently tried to install via the synaptic package manager choosing default-jre-headless 1.6-34 which included the openjdk-6-jre-headless as well as other packages. This gave me the same errors as before using the web install.

Was the installation aborted due to these errors? If these failed are alternative download methods or is the error from my connection or system configuration? How to then proceed with installing java RE and then java DK?

Or is it simply a server/connection problem that will get fixed in time and I should try again later?

UPDATE:I ran sudo apt-get install openjdk-6-jre-headless and the installation failed again giving E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

3
  • 1
    As the error message suggest, please run sudo apt-get update && sudo apt-get install --fix-missing and then try sudo apt-get install openjdk-6-jre-headless Mar 2, 2012 at 13:57
  • @nitstorm, thanks, that worked: alex@alex-laptop:~$ java -version java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.13) (6b20-1.9.13-0ubuntu1~10.04.1) OpenJDK Server VM (build 19.0-b09, mixed mode) could you put your comment as an answer to give you the credit due? Does this output mean that the java development kit is also included? Do I need to now install that separately?
    – Vass
    Mar 2, 2012 at 14:17
  • 1
    Cool :) Posted as answer :) Not sure, but I don't think JDK got installed, coz it states OpenJDK Runtime Environment but as I said, I am not 100% sure. This answer should prove useful for you at this stage :) Mar 2, 2012 at 14:23

1 Answer 1

8

As suggested in the console messages, please run

sudo apt-get update
sudo apt-get install --fix-missing
sudo apt-get install openjdk-6-jre-headless

That should most definitely fix the problem :)

1
  • best answer! thank you
    – grrigore
    Oct 27, 2021 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .