Search This Blog

Wednesday, November 30, 2011

How to Install Java in Linux

1. Use following command to know the current jdk version available in apt-get
sudo apt-cache search jdk

2. Use following command to install JDK and JRE
apt-get install sun-java6-jdk sun-java6-jre

Friday, November 25, 2011

Error: gzip: stdin: not in gzip format

# gzip -d xxxxxx.x.tar.gz
# tar -zxvf xxxxxx.x.x.tar

It gives following error:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors

Solution:
You used "tar -zxvf" for the second command. the 'z' option tells tar to use gzip to uncompress the file. Since you already uncompressed it in the first command, gzip doesn't know what to do with it, and it consequently croaks. Tar stops because gzip encountered a problem. So, with the file you have now, you would extract it with:
tar -xvf xxxxxx.x.x.tar

I would go back and re-gzip the tar file though (to save space):
gzip xxxxxx.x.x.tar
tar -zxvf xxxxxx.x.x.tar.gz

Source: http://www.linuxquestions.org/questions/linux-newbie-8/tar-error-child-returned-status-1-a-208083/