apt-get installing oracle java 7 stopped working

前端 未结 5 1060
执念已碎
执念已碎 2021-02-01 07:07

Recently apt-get install -y oracle-java7-installer stopped working.

I know in their roadmap, I think the public version is no longer supported, but it\'s be

5条回答
  •  天涯浪人
    2021-02-01 07:56

    So looks like the direct links to the download no longer work( As noted by Meir Maor above)

    Here are the steps to get this running again:

    1. Go to http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html and accept the license. Download the file we need (jdk-7u80-linux-x64.tar.gz in this case)

    2. Assuming the file downloaded to your Downloads directory, we need to move it to /var/cache/oracle-jdk7-installer

      cd ~/Downloads (Change to directory to which you saved file from step 1)
      sudo mkdir /var/cache/oracle-jdk7-installer
      sudo mv jdk-7u80-linux-x64.tar.gz /var/cache/oracle-jdk7-installer/
      
    3. Not sure if necessary but I had luck with this:

      echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
      
    4. Run the installer now. It will use the file we saved in /var/cache instead of trying to download it from Oracle

      sudo apt-get install oracle-java7-installer
      

    I got step 3 from http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html

提交回复
热议问题