3

I am using a base edition of Debian and am trying to install Java 7 on it using this command:

root@server:~# apt-get install openjdk-7-jdk

However, I end up getting this error:

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

It seems like the package is not in the repository, so I am not sure how to proceed.

1 Answer 1

7

Try a quick apt-get update to get the latest package lists from repos, and then apt-cache search openjdk to check out what the latest offered version is that's available to you, if any are.

Most likely if this is a fresh base install you're going to have to go into your /etc/apt/sources.list and make sure you have the non-free package lists enabled, which aren't enabled by default in Debian I believe. So check this How do I enable non-free packages on Debian?

You must log in to answer this question.

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