Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have following Ubuntu:

Ubuntu 12.04.1 LTS

With following apt installed:

apt 0.8.16~exp12ubuntu10.2 for i386 compiled on Jun 15 2012 14:41:15

This is content of sources.list:

deb http://archive.ubuntu.com/ubuntu precise main universe restricted multiverse
deb-src http://archive.ubuntu.com/ubuntu precise universe main multiverse restricted

deb http://security.ubuntu.com/ubuntu/ precise-security universe main multiverse restricted
deb http://archive.ubuntu.com/ubuntu precise-updates universe main multiverse restricted
deb http://archive.ubuntu.com/ubuntu precise-backports universe main multiverse restricted

# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner

# deb http://extras.ubuntu.com/ubuntu precise main
# deb-src http://extras.ubuntu.com/ubuntu precise main

I made:

sudo apt-get clean
sudo apt-get update

I didn't had errors.
When I do:

sudo apt-cache search ^sun-java

I have only:

sun-javadb-client - Java DB client
sun-javadb-common - Java DB common files
sun-javadb-core - Java DB core
sun-javadb-demo - Java DB demo
sun-javadb-doc - Java DB documentation
sun-javadb-javadoc - Java DB javadoc

And finally when I do:

sudo apt-get install sun-java5-jdk

I have:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package sun-java5-jdk

But!!! The package is existing in the repository (!!!):


Any ideas?
Thank you for ahead.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The reason why you can't install sun-java5-jdk is because it doesn't exist in the repository anymore. It was removed because of a security risk.

If you need to use Java, you could install OpenJDK.

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.