I'm installing sqlite on Alpine Linux. I download sqlite-autoconf-3130000.tar.gz but 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.

wget https://www.sqlite.org/2015/sqlite-autoconf-3090100.tar.gz
tar -zxvf sqlite-autoconf-3090100.tar.gz
  • Could you please update your answer with the command (and its arguments) that you tried to run. – DarkHeart Aug 9 '16 at 6:56
  • 1
    Did the download complete successfully? If it did, ls -l sqlite-autoconf-3090100.tar.gz should tell you that the file is 2284128 bytes in size. – Stephen Kitt Aug 9 '16 at 7:50
  • Also, is it currently a gzip formatted file? Some browsers do on the fly decompression, meaning that it might still named sqlite-autoconf-3090100.tar.gz but that the contents might actually be sqlite-autoconf-3090100.tar. No idea if wget does equally smart things, but it is easily tested by leaving of the z flag from tar. – Hennes Jan 25 '17 at 9:06

Try to install the tar package (apk add tar). Busybox tar (default) doesn't support all features.

  • 2
    I ran into the same issue when running a tar command in a Dockerfile and installing tar worked for me. It's kind of confusing because if you run the command in the shell in the container, it works. But not if it's a RUN command in the Dockerfile without having installed tar first. :| – 3cheesewheel Oct 10 '16 at 12:06

tar:invalid magic means that the file is corrupted.

Please check the md5sum if matches...this is what i got:

 md5sum  sqlite-autoconf-3090100.tar.gz 
 74931054399a2d7acf35637efe8d6f45  sqlite-autoconf-3090100.tar.gz

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.