apt-get installing oracle java 7 stopped working

前端 未结 5 1062
执念已碎
执念已碎 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:59

    I just ran into this trying to install Java 6 (don't ask).

    Since I'm short on time, I was fine with a quick and dirty answer. I noticed the URL looked for by the installer was http-based (vs https), which makes the below solution possible.

    1. Make sure a web server is installed (I already had Apache on my box)

    2. Download the file that is requested. In your case that is jdk-7u80-linux-x64.tar.gz. See Meir Maor's answer above

    3. On your local web server, recreate the path structure requested for the file. In your case that is otn-pub/java/jdk/7u80-b15.

    4. Copy the downloaded file into the path above

    5. Edit /etc/hosts and add 127.0.0.1 download.oracle.com

    6. Run apt-get install -y oracle-java7-installer again.

    7. The installer will now grab the file from your local web server and complete successfully.

    There may be a better way to do this, but it worked for me.

提交回复
热议问题