Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm extremely new to linux and wanted to run a server but the program want to run requires linux.

Im trying to run this command via ssh to my server but receive this every time.

sudo apt-get install sun-java6-bin sun-java6-jdk sun-java6-jre

But I reccieve this.

user@serverubuntu:~$ sudo apt-get install sun-java6-bin sun-java6-jdk sun-java6-jre
[sudo] password for user: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package sun-java6-jre is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package sun-java6-bin is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'sun-java6-bin' has no installation candidate
E: Package 'sun-java6-jdk' has no installation candidate
E: Package 'sun-java6-jre' has no installation candidate
user@serverubuntu:~$ sudo apt-get install sun-java7-bin sun-java7-jdk sun-java7-jre
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package sun-java7-bin
E: Unable to locate package sun-java7-jdk
E: Unable to locate package sun-java7-jre
user@serverubuntu:~$

Sorry Im extremely new to linux and dont know how to do much.

Thanks :)

share|improve this question
    
This might help: askubuntu.com/q/55848/83046 –  green7 Feb 24 '13 at 20:04
    
I would start here: help.ubuntu.com/community/Java. Do you specifically need the Oracle version? If not then go for the OpenJDK, I would suggest. –  Clive van Hilten Feb 24 '13 at 20:05
add comment

2 Answers

up vote 2 down vote accepted

The official java packages has been removed from the Ubuntu repositories. You can install open-jdk instead:

sudo apt-get install openjdk-7-jdk

If you need the real thing you need to install the oracle java package:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
share|improve this answer
add comment

as i know you must find/add repositories to your system and then install it.

This may mean that the package is missing, has been obsoleted, or is only available from another source

Type this on google search and try to find some ways to fix this issue. You must read a lot firs before doing an action on linux.

For now this. I'll try to find something and post here again.

Good luck.

share|improve this answer
    
Brilliant thanks guys ! –  Valkyrie0512 Feb 24 '13 at 20:45
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.