Oracle Java 8 安装问题

Oracle Java 8 安装问题

尝试安装 Oracle Java 8 时出现以下错误。请告诉我出了什么问题。

$ sudo apt-get install oracle-java8-installer
[sudo] password for pragya: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package oracle-java8-installer 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 'oracle-java8-installer' has no installation candidate

答案1

添加此存储库

sudo add-apt-repository ppa:webupd8team/java

然后做

sudo apt-get update

然后是jdk8

sudo apt-get install oracle-java8-installer

希望这能有效。

相关内容