Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

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?

share|improve this answer
add comment

Your Answer

 
discard

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.