1. 程式人生 > >Ubuntu 18.04 install JDK8.201

Ubuntu 18.04 install JDK8.201

dpkg load sub oracl https -a href ech scrip

  1. sudo add-apt-repository ppa:webupd8team/java
    1. Press Enter to continue.
  2. sudo apt update
  3. sudo apt install oracle-java8-installer


Issues:

  • subprocess installed post-installation script returned error exit status 1

Solutions:

  1. cd /var/lib/dpkg/info
  2. sudo sed -i ‘s|J_DIR=jdk1.8.0_191|J_DIR=jdk1.8.0_201|‘ oracle-java8-installer.*
  3. 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.*
  4. sudo sed -i ‘s|SHA256SUM_TGZ="640333e749f24428b78c2b10422f7174f8fbd0b8acde27526c195024fad8b6b6"|SHA256SUM_TGZ="12c745fbb8735bf450b8c6ba6f649bebe19915f05742975e443bdc8566170352"|‘ oracle-java8-installer.*
  5. sudo sed -i ‘s|J_DIR=jdk1.8.0_191|J_DIR=jdk1.8.0_201|‘ oracle-java8-installer.*
  6. Than reinstall
    1. sudo apt install oracle-java8-installer
    2. sudo apt install oracle-java8-set-default
    3. java –version



Reference:

  1. https://www.cnblogs.com/VeryGoodVeryGood/p/8318105.html
  2. www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Ubuntu 18.04 install JDK8.201