Java 安装问题

Java 安装问题

当我输入以下命令时

ramesh@ramesh-H61M-S2P-B3:~$ sudo apt-get install openjdk-6-jdk

出现错误,

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package openjdk-6-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
However the following packages replace it:
apt

E: Package 'openjdk-6-jdk' has no installation candidate

如何解决?

答案1

$ sudo apt-get install openjdk-6-*

在终端中尝试一下

也许 openjdk6 可能已经从 ubuntu 存储库中淘汰,请尝试此操作

$ sudo apt-get install openjdk-7-jdk

答案2

尝试sudo apt-get update然后sudo apt-get install openjdk-6-jdk

相关内容