Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
6 years, 7 months ago
I'm installing sqlite on Alpine Linux. I download
tar could not open it. I tried this
answer but it's not working.
tar gives this message:
tar: invalid magic
tar: short read
I wrote these commands.
tar -zxvf sqlite-autoconf-3090100.tar.gz
Aug 9, 2016 at 6:44
571 1 1 gold badge 4 4 silver badges 4 4 bronze badges
Try to install the tar package (apk add tar). Busybox tar (default) doesn't support all features.
Aug 9, 2016 at 8:56
This doesn't necessarily mean the Alpine version of
tar is incompatible, as Francesco pointed out you should really check your file checksums.
I ran into this while doing a
curl https://github.com/someproject/releases/project-1.1.0.gz | tar -xvzf in my Dockerfile.
It turns out what I had forgotten was that
curl will only follow redirects if you allow it with
-L, and so it was never getting to the actual file, it was literally downloading the html telling it there was a redirect. Adding the
-L allowed me to save the file without bloating my container with a new
tar (beyond the "bloat" added by
Sep 24, 2018 at 23:55
762 6 6 silver badges 14 14 bronze badges
if you use alpine in docker, please assert that you use
COPY instead of
ADD in your container file (
ADD will decompress on building the layer
alpine default tar
doesn't give you the hint
tar (child): sqlite-autoconf-3090100.tar.gz: Cannot read: Is a directory
tar (child): At beginning of tape, quitting now
tar (child): Error is not recoverable: exiting now
Jan 7, 2020 at 12:11
223 3 3 silver badges 7 7 bronze badges
tar:invalid magic means that the file is corrupted.
Please check the md5sum if matches...this is what i got:
Jan 25, 2017 at 8:33
I got the same issue and solved it, however I'm not sure you are facing the same issue.
tar -zxvf file.tar.gz
tar -zxvf file.tar.gz
Notice that I had forgoten the "https://" wherein the file did get downloaded but the tar gave me the same error. If the file is not found make sure you use
Jul 24, 2019 at 15:16
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only
ls -l sqlite-autoconf-3090100.tar.gzshould tell you that the file is 2284128 bytes in size.
zflag from tar.