Page 1 of 1
RPi3 w/ Stretch cannot extract tarball
Posted: Sat Mar 10, 2018 6:08 pm
by bkenobi
I have a tarball (file.tgz) that I need to extract. I tested the file with 7zip on Win7 and it checks ok. When I try to extract on my RPi3 with Stretch, it fails.
Code: Select all
pi@raspberrypi:~ $ tar -xvzf file.tgz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
I copied the same file over to my RPi1 running Jessie and it tested good. Is there something I'm missing? I have the system up to date as I just created the OS this morning including all updates. The image is "2017-11-29-raspbian-stretch-lite.img" in case it matters.
Re: RPi3 w/ Stretch cannot extract tarball
Posted: Sat Mar 10, 2018 6:14 pm
by DougieLawson
Try
tar xavf somefile.tgz
Re: RPi3 w/ Stretch cannot extract tarball
Posted: Sat Mar 10, 2018 6:39 pm
by bkenobi
I get the same result with that set of options. RPi1 w/ Jessie works, RPi3 w/ Stretch fails (same output).
Re: RPi3 w/ Stretch cannot extract tarball
Posted: Sat Mar 10, 2018 7:25 pm
by pcmanbob
Well stretch lite based on same image and resonantly up to date just ran tar xvzf RPLCD-0.4.0.tar.gz to test it and it unzipped and created directories and files ok.
So it suggests the file is at fault
what file and from were ?
Re: RPi3 w/ Stretch cannot extract tarball
Posted: Sat Mar 10, 2018 7:33 pm
by DougieLawson
Check the sha256sum against the value published at:
https://www.raspberrypi.org/downloads/raspbian/
Re: RPi3 w/ Stretch cannot extract tarball
Posted: Sat Mar 10, 2018 7:37 pm
by n67
I doubt that OP's "file.tgz" has anything to do with anything at raspberrypi.org/downloads.
Re: RPi3 w/ Stretch cannot extract tarball
Posted: Sat Mar 10, 2018 9:45 pm
by bkenobi
The file is a program I'm downloading from a git repository. I downloaded the file on Windows and tested it in 7zip and it shows good. I downloaded it on RPi3 with Stretch and it gives an error. I transferred the file to Windows from the RPi3 and tested with 7zip and it is good. That means that the file must be downloading correctly but for some reason the RPi3 can't extract it. Any other thoughts?
I can't imagine the issue is the file, but the file is located here:
https://github.com/Bounz/HomeGenie-BE/r ... 15_all.tgz
Re: RPi3 w/ Stretch cannot extract tarball
Posted: Sat Mar 10, 2018 10:10 pm
by rpdom
It looks like the file is a .tar, not a .tgz Trying to extract it with tar xzvf ... gives an error, but tar xvf ... works on my Linux laptop. I haven't tested it on a Pi yet.
Re: RPi3 w/ Stretch cannot extract tarball
Posted: Sat Mar 10, 2018 10:13 pm
by SurferTim
I downloaded your file and extracted it with this:
Re: RPi3 w/ Stretch cannot extract tarball
Posted: Sat Mar 10, 2018 10:16 pm
by bkenobi
Just to verify that things weren't getting corrupted when transferred between systems, I did a shasum on the RPi3, RPi1, and Windows and all 3 are identical. I am now confident the issue is not the file.
I tried extracting with your command line but it still gives an error on Stretch. I tried on Jessie and it works.
Re: RPi3 w/ Stretch cannot extract tarball
Posted: Sat Mar 10, 2018 10:18 pm
by SurferTim
My bad. Didn't work with RPi3/Stretch.
Re: RPi3 w/ Stretch cannot extract tarball
Posted: Sat Mar 10, 2018 10:19 pm
by bkenobi
Strange. I renamed the file to a ".tar" extension and it was able to extract on Stretch. There must be a difference between the two versions of tar then?
Jessie = 1.27.1
Stretch = 1.29