1.修改apt的源信息 vim /etc/apt/sources.list.d/java-8-debian.list
2.添加源信息 deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty maindeb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
3.添加GPG key apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
4.更新源并且下载oracle-java8 apt-get updateapt-get install oracle-java8-installer
参考信息: https://launchpad.net/~webupd8team/+archive/ubuntu/java