2

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?
David Foerster
  • 36,890
  • 56
  • 97
  • 151
sree
  • 41

3 Answers3

0

Use Ubuntu Software Center: OpenJDK Java 6 Runtime

RyanNHG
  • 159
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
answerSeeker
  • 901
  • 3
  • 11
  • 26
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
Jaime
  • 1,440