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.

dawud
  • 14,918
  • 3
  • 41
  • 61
Bobby
  • 31
  • 1
  • 1
  • 2

1 Answers1

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?

inetplumber
  • 680
  • 4
  • 9