Ubuntu 10.10 -bash: java: comando não encontrado

0

Acabei de comprar VPS fresco com o Ubuntu 10.10. Eu seguindo este guia link para criar o servidor Lineage2, mas isso não importa. Eu tento usar o comando java -version e tenho erro:

-bash: java: command not found

Se eu pular esta etapa e usar este comando (para instalar o Java): sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk recebi este erro:

Unable to locate package sun-java6-bin
Unable to locate package sun-java6-jre
Unable to locate package sun-java6-jdk

O que há de errado com isso? Obrigado por respostas.

UPDATE # 1

Quando eu digito: java -version

Recebi erro: -bash: java: command not found

Quando eu digito: sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner

Recebi erro: sudo: add-apt-repository: command not found

Quando eu digito: sudo apt-get update

recebi um erro:

Ign http://archive.ubuntu.com maverick Release.gpg
Ign http://archive.ubuntu.com/ubuntu/ maverick/main Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick/restricted Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick/universe Translation-en
Ign http://archive.ubuntu.com maverick-updates Release.gpg
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/main Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/restricted Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/universe Translation-en
Ign http://archive.ubuntu.com maverick-security Release.gpg
Ign http://archive.ubuntu.com/ubuntu/ maverick-security/main Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-security/restricted Translation-e                                                                                                 n
Ign http://archive.ubuntu.com/ubuntu/ maverick-security/universe Translation-en
Ign http://archive.ubuntu.com maverick Release
Ign http://archive.ubuntu.com maverick-updates Release
Ign http://archive.ubuntu.com maverick-security Release
Ign http://archive.ubuntu.com maverick/main amd64 Packages
Ign http://archive.ubuntu.com maverick/restricted amd64 Packages
Ign http://archive.ubuntu.com maverick/universe amd64 Packages
Ign http://archive.ubuntu.com maverick-updates/main amd64 Packages
Ign http://archive.ubuntu.com maverick-updates/restricted amd64 Packages
Ign http://archive.ubuntu.com maverick-updates/universe amd64 Packages
Ign http://archive.ubuntu.com maverick-security/main amd64 Packages
Ign http://archive.ubuntu.com maverick-security/restricted amd64 Packages
Ign http://archive.ubuntu.com maverick-security/universe amd64 Packages
Ign http://archive.ubuntu.com maverick/main amd64 Packages
Ign http://archive.ubuntu.com maverick/restricted amd64 Packages
Ign http://archive.ubuntu.com maverick/universe amd64 Packages
Ign http://archive.ubuntu.com maverick-updates/main amd64 Packages
Ign http://archive.ubuntu.com maverick-updates/restricted amd64 Packages
Ign http://archive.ubuntu.com maverick-updates/universe amd64 Packages
Ign http://archive.ubuntu.com maverick-security/main amd64 Packages
Ign http://archive.ubuntu.com maverick-security/restricted amd64 Packages
Ign http://archive.ubuntu.com maverick-security/universe amd64 Packages
Err http://archive.ubuntu.com maverick/main amd64 Packages
  404  Not Found [IP: 91.189.92.200 80]
Err http://archive.ubuntu.com maverick/restricted amd64 Packages
  404  Not Found [IP: 91.189.92.200 80]
Err http://archive.ubuntu.com maverick/universe amd64 Packages
  404  Not Found [IP: 91.189.92.200 80]
Err http://archive.ubuntu.com maverick-updates/main amd64 Packages
  404  Not Found [IP: 91.189.92.200 80]
Err http://archive.ubuntu.com maverick-updates/restricted amd64 Packages
  404  Not Found [IP: 91.189.92.200 80]
Err http://archive.ubuntu.com maverick-updates/universe amd64 Packages
  404  Not Found [IP: 91.189.92.200 80]
Err http://archive.ubuntu.com maverick-security/main amd64 Packages
  404  Not Found [IP: 91.189.92.200 80]
Err http://archive.ubuntu.com maverick-security/restricted amd64 Packages
  404  Not Found [IP: 91.189.92.200 80]
Err http://archive.ubuntu.com maverick-security/universe amd64 Packages
  404  Not Found [IP: 91.189.92.200 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick/main/binary-a                                                                                                 md64/Packages.gz  404  Not Found [IP: 91.189.92.200 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick/restricted/bi                                                                                                 nary-amd64/Packages.gz  404  Not Found [IP: 91.189.92.200 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick/universe/bina                                                                                                 ry-amd64/Packages.gz  404  Not Found [IP: 91.189.92.200 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick-updates/main/                                                                                                 binary-amd64/Packages.gz  404  Not Found [IP: 91.189.92.200 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick-updates/restr                                                                                                 icted/binary-amd64/Packages.gz  404  Not Found [IP: 91.189.92.200 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick-updates/unive                                                                                                 rse/binary-amd64/Packages.gz  404  Not Found [IP: 91.189.92.200 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick-security/main                                                                                                 /binary-amd64/Packages.gz  404  Not Found [IP: 91.189.92.200 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick-security/rest                                                                                                 ricted/binary-amd64/Packages.gz  404  Not Found [IP: 91.189.92.200 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick-security/univ                                                                                                 erse/binary-amd64/Packages.gz  404  Not Found [IP: 91.189.92.200 80]

E: Some index files failed to download, they have been ignored, or old ones used                                                                                                  instead.

Meu /etc/apt/sources.list se parece com:

Alguém pode me ajudar?

    
por Rs Penki 12.03.2013 / 00:48

3 respostas

1

Você precisa remover o comentário das duas linhas em /etc/apt/sources.list que se referem a "parceiro" Experimente:

sudo nano /etc/apt/sources.list

substitua "nano" pelo editor de texto instalado, como o vi etc.

descomente as duas linhas referindo-se a "parceiro", (remova o #)

Se não houver repositório, adicione um:

sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"  

Agora,

sudo apt-get update 
sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk
    
por 12.03.2013 / 01:12
0

Tente fazer o sudo apt-get instalar o openjdk-6-jre, o openjdk-6-bin, o openjdk-6-jdk

    
por 12.03.2013 / 00:51
0

eu tive esse problema semelhante esse é o problema dos frameworks (pythons, ruby, perl). então eu mudei o sistema operacional do Ubuntu para 12.04.so a melhor maneira de resolver esse caso é a atualização do os

    
por 19.03.2013 / 05:53