2

This question already has an answer here:

Accidentally I removed Openjdk from Ubuntu. Now it is not possible to install it again.It gives error that:

Err http://in.archive.ubuntu.com/ubuntu/ precise-updates/main tzdata all 2014c-0ubuntu0.12.04
  404  Not Found [IP: 91.189.92.200 80]

I used to try sudo apt-get update also.

Finally it gives:

WARNING: The following packages cannot be authenticated!
  openjdk-6-jre-lib ca-certificates-java tzdata tzdata-java openjdk-6-jre-headless libgif4 openjdk-6-jre libatk-wrapper-java libatk-wrapper-java-jni
  libxt-dev ttf-dejavu-extra icedtea-6-jre-cacao icedtea-6-jre-jamvm icedtea-netx-common icedtea-netx openjdk-6-jdk
Install these packages without verification [y/N]? y
Err http://in.archive.ubuntu.com/ubuntu/ precise-updates/main tzdata all 2014c-0ubuntu0.12.04
  404  Not Found [IP: 91.189.91.14 80]
Err http://in.archive.ubuntu.com/ubuntu/ precise-updates/main tzdata-java all 2014c-0ubuntu0.12.04
  404  Not Found [IP: 91.189.91.14 80]
Get:1 http://in.archive.ubuntu.com/ubuntu/ precise-updates/main libxt-dev amd64 1:1.1.1-2ubuntu0.1 [490 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu/ precise-updates/main openjdk-6-jdk amd64 6b31-1.13.3-1ubuntu1~0.12.04.2 [16.0 MB]
Fetched 16.5 MB in 59s (278 kB/s)                                                                                                                      
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/t/tzdata/tzdata_2014c-0ubuntu0.12.04_all.deb  404  Not Found [IP: 91.189.91.14 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/t/tzdata/tzdata-java_2014c-0ubuntu0.12.04_all.deb  404  Not Found [IP: 91.189.91.14 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

marked as duplicate by David Foerster, Eric Carvalho, Eliah Kagan, Zanna, mniess Oct 20 '17 at 11:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Run sudo apt-get update and try installing again. Also, you'll likely have updates to other packages available. – saiarcot895 Jun 18 '14 at 12:22
  • I tried that also.But not working.. – sree Jun 18 '14 at 12:26
  • Change your server mirror with this article before update. – user224082 Jun 18 '14 at 12:27
  • Did you mean ubuntu software centre – sree Jun 18 '14 at 12:30
  • sorry.I could not find any article their.. – sree Jun 18 '14 at 12:35
0

Use Ubuntu Software Center: OpenJDK Java 6 Runtime

0

Why do you need openjdk? it's slow and not fully implemented. Use java instead.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
0

Since June of 2017, the traditional way to install the Java 6, does not work. Note that Java 1.6 is not supported anymore by Oracle neither.


The traditional way to install Java

The typical method to install Java is adding the webup8 repository and using apt-get to install the software.

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java6-installer     # this does not work

Currently, I think you can install Java 8 or Java 9.


An alternative method

You may try to download the installer from the Java download archive using a Browser. There is a .bin file that is a self-extracting installer.

For instance, if you download the jdk-6u45-linux-x64.bin, you must run that file

$ jdk-6u45-linux-x64.bin

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