Ubuntu 18.04 install JDK8.201
阿新 • • 發佈:2019-01-18
dpkg load sub oracl https -a href ech scrip
- sudo add-apt-repository ppa:webupd8team/java
- Press Enter to continue.
- sudo apt update
- sudo apt install oracle-java8-installer
Issues:
- subprocess installed post-installation script returned error exit status 1
Solutions:
- cd /var/lib/dpkg/info
- sudo sed -i ‘s|J_DIR=jdk1.8.0_191|J_DIR=jdk1.8.0_201|‘ oracle-java8-installer.*
- sudo sed -i ‘s|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/|PARTNER_URL=https://download.oracle.com/otn-pub/java/jdk/8u201-b09/42970487e3af4f5aa5bca3f542482c60/|‘ oracle-java8-installer.*
- sudo sed -i ‘s|SHA256SUM_TGZ="640333e749f24428b78c2b10422f7174f8fbd0b8acde27526c195024fad8b6b6"|SHA256SUM_TGZ="12c745fbb8735bf450b8c6ba6f649bebe19915f05742975e443bdc8566170352"|‘ oracle-java8-installer.*
- sudo sed -i ‘s|J_DIR=jdk1.8.0_191|J_DIR=jdk1.8.0_201|‘ oracle-java8-installer.*
- Than reinstall
- sudo apt install oracle-java8-installer
- sudo apt install oracle-java8-set-default
- java –version
Reference:
- https://www.cnblogs.com/VeryGoodVeryGood/p/8318105.html
- www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Ubuntu 18.04 install JDK8.201