問題: 我該如何在 Elemetary OS Luna 上安裝Oracle Java 7?
回答: 在 Elementary OS Luna 安裝 Java 7 的步驟如下: 由於Elementary OS是基於Ubuntu,所以我們允許使用具有多種Java包的WEPUD8 PPA。
打開終端。
運行以下指令添加Java的PPA到你的軟件倉:
$ sudo add-apt-repository ppa:webupd8team/java You are about to add the following PPA to your system: Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK6 / JDK7 / JDK8). There are no actual Java files in this PPA. More info: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html Debian installation instructions: http://www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html More info: https://launchpad.net/~webupd8team/+archive/java Press [ENTER] to continue or ctrl-c to cancel adding it
按回車繼續
gpg: keyring `/tmp/tmpB5WwDG/secring.gpg' created gpg: keyring `/tmp/tmpB5WwDG/pubring.gpg' created gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com gpg: /tmp/tmpB5WwDG/trustdb.gpg: trustdb created gpg: key EEA14886: public key "Launchpad VLC" imported gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) OK
現在更新你的系統
$ sudo apt-get update
運行以下命令安裝Java 7:
$ sudo apt-get install oracle-java7-installer [sudo] password for enock: Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: gir1.2-gstreamer-0.10 libilmbase6 libmagickcore4 libmagickwand4 libcdt4 libmagickcore4-extra liblqr-1-0 imagemagick-common libpathplan4 libopenexr6 rsync netpbm libgvc5 libnetpbm10 libgraph4 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: gsfonts-x11 java-common Suggested packages: default-jre equivs binfmt-support visualvm ttf-baekmuk ttf-unfonts ttf-unfonts-core ttf-kochi-gothic ttf-sazanami-gothic ttf-kochi-mincho ttf-sazanami-mincho ttf-arphic-uming The following NEW packages will be installed: gsfonts-x11 java-common oracle-java7-installer 0 upgraded, 3 newly installed, 0 to remove and 196 not upgraded. Need to get 88.5 kB of archives. After this operation, 473 kB of additional disk space will be used. Do you want to continue [Y/n]?
輸入代表Yes的Y以及回車鍵繼續安裝。
在安裝過程中,你需要同意條款才能繼續。選擇OK。
然後選擇Yes繼續。
現在請等待安裝包的下載與自動安裝:
安裝完成。你可以在終端上查看Java版本:
$ java -version java version "1.7.0_45" Java(TM) SE Runtime Environment (build 1.7.0_45-b18) Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
推薦閱讀:
全新Elementary圖標測試版安裝PPA http://www.linuxidc.com/Linux/2011-12/50511.htm
Elementary OS Luna 穩定版發布 http://www.linuxidc.com/Linux/2013-08/88658.htm
Slingshot :Ubuntu安裝Elementary OS啟動器 http://www.linuxidc.com/Linux/2011-06/36990.htm
Ubuntu 安裝Oracle Java 7 (JDK) http://www.linuxidc.com/Linux/2011-09/43025.htm
Oracle JDK 7u40 發布 http://www.linuxidc.com/Linux/2013-09/89982.htm