1, I use the command
wget http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz
After downloading, using TAR-XVZF jdk-7u79-linux-x64.tar.gz decompression, the following error occurred:
Gzip:stdin:not in gzip format
Tar:child returned status 1
Tar:error isn't recoverable:exiting now
The error.
Reason:
Cause I found the reason:
a MAVEN package was downloaded using Wget-n, http://www.apache.org/dyn/closer.cgi/maven/binaries/ Apache-maven-3.0.3-bin.tar.gz, the decompression of the time has been reported this error. Feel very strange, Google found a lot of solutions are useless, and finally found that the problem is actually the case. http://www.apache.org/dyn/closer.cgi/maven/binaries/ Apache-maven-3.0.3-bin.tar.gz points to a page, the specific download package is contained in a link on this page, so running the download command above is actually an HTML page. This can be verified with the file command. File apache-maven-3.0.3-bin.tar.gzapache-maven-3.0.3-bin.tar.gz:html document So the reason for the error is here, not the decompression command is not the problem. Syntax: file [-belvz][-f<name File>][-m<Magic Digital File>...] [File or directory ...] Additional note: Through the file directive, we are able to identify the type of the document. Parameter:-B The file name is not displayed when the identification results are listed. -C Displays the instruction execution process in detail to facilitate troubleshooting or analysis of the execution of the program. -F<name File>Specify a name file with the contents of one or more file names, and let file identify the files sequentially, in the form of one file name per column. -L Displays the category of the file that the symbolic connection points to directly. -M<Magic Digital File>Specifies a magic digital file. -V Displays version information. -Z try to interpret the contents of the compressed file.
In fact, the download is HTML:
# file Jdk-7u79-linux-x64.tar.gz
jdk-7u79-linux-x64.tar.gz: HTML Document Text
The correct way to download:
wget--no-check-certificate--no-cookies--header "Cookie:oraclelicense=accept-securebackup-cookie"/HTTP/ Download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz
(Oracle website download JDK, need to click on the licence to download, use the following command, directly can download.) )
Linux installation JDK