1. 程式人生 > >解決解壓JDK報錯:tar: Error is not recoverable

解決解壓JDK報錯:tar: Error is not recoverable

hot block .gz 環境變量設置 turned cover mod root java8

報錯

#tar -xvf jdk-8u131-linux-x64.tar.gz,執行命令後報錯如下:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

完美解決

在wget後添加一下
 --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" 
命令如下:
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie"  “你需要下載的東西”

Java8 信息輸出

[root@zuitu script]# tail -n 5 /etc/profile   #環境變量設置
#Java Env
export JAVA_HOME=/server/source/jdk1.8.0_191
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

[root@zuitu script]# java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
[root@zuitu script]#

解決解壓JDK報錯:tar: Error is not recoverable