我通过下载源代码安装了 Java。我设置了 Java 路径,一切正常,但当我想安装另一个应用程序(例如 Apache-Ambari-server ambari-server start
)时,我收到此错误:
E: Release 'ambari-server*.deb' for 'oracle-jdk8-installer' was not found
为什么我的系统上有 Java 时会出现错误?
編輯:
安装 JAVA:添加路径至/etc/profile
:
JAVA_HOME=/usr/local/java/jdk1.8.0_20
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.8.0_20/bin/java" 1
sudo update-alternatives --set java /usr/local/java/jdk1.8.0_20/bin/java
source /etc/profile