Sharon Watinsan
Sharon Watinsan

Reputation: 9840

Could not install Java on Linux

I am trying to install java on a Linux machine. I downloaded the file via wget http://download.oracle.com/otn-pub/java/jdk/7u72-b14/jdk-7u72-linux-x64.tar.gz

Then i tried the following command:

tar zxvf jdk-7u72-linux-x64.tar.gz

gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now [root@localhost ~]#

Can someone tell me how to install java on a Linux machine ? I get the above error, and i have no clue how to resolve it.

Upvotes: 0

Views: 1683

Answers (2)

user3453226
user3453226

Reputation:

Install Centos and send this on Putty:

yum install java7

Upvotes: 1

Nu11 Po1nter
Nu11 Po1nter

Reputation: 1

The downloaded file might get corrupted. You may need to download it again. You can check its header by typing

$ file jdk-7u72-linux-x64.tar.gz

The command should return something like "gzip compressed data". Also, you may try to check the file integrity by

$ gzip -t jdk-7u72-linux-x64.tar.gz

Upvotes: 0

Related Questions