78

通过 apt-get 存储库在 Debian 中安装 Oracle Java 7 似乎不起作用。

apt-get install oracle-java7-installer

样子apt-get不认识oracle-java7-installer

4

1 回答 1

166

做了一些谷歌后设法得到答案..

echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
# Java 7
apt-get install oracle-java7-installer
# For Java 8 command is:
apt-get install oracle-java8-installer
于 2013-03-21T09:27:12.407 回答