apt-get install jdk8 失敗

背景:elasticsearch 須要安裝jdk8java

apt-cache search java | grep jdk   # 無版本8
apt-get update   # 更新後執行,仍沒有

add-apt-repository ppa:webupd8team/java
apt-get update    #更新系統,刷新軟件源
apt-get install oracle-java8-installer   
#網絡來源 https://blog.csdn.net/infoflow/article/details/77856088

 

 報錯:linux

Downloading Oracle Java 8... --2018-06-12 10:49:41-- http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.tar.gz Connecting to 10.0.10.117:3142... connected. Proxy request sent, awaiting response... 501 Redirected to invalid target 2018-06-12 10:49:41 ERROR 501: Redirected to invalid target.
download failed Oracle JDK 8 is NOT installed. dpkg: error processing package oracle-java8-installer (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: oracle-java8-installer E: Sub-process /usr/bin/dpkg returned an error code (1)

排查緣由:
oracle 原來下載地址沒法下載

JRE Expiration Date
The JRE expires whenever a new release with security vulnerability fixes becomes available. 
Critical patch updates, which contain security vulnerability fixes, are announced one year in advance on Critical Patch Updates, Security Alerts and Third Party Bulletin. 
This JRE (version 8u144) will expire with the release of the next critical patch update scheduled for October 17, 2017.
Seems to be hardcoded in the installer.
Code:
PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/$FILENAME #must be modified for each release 

https://stackoverflow.com/questions/43587635/dpkg-error-processing-package-oracle-java8-installer-configure web

其中解決方法未確認,按如下官方解壓方法解決安裝網絡

相關文章
相關標籤/搜索