- 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: