Autotools - tar This does not look like a tar archive

后端 未结 2 1423
遇见更好的自我
遇见更好的自我 2021-02-12 22:36

After running make distcheck I get the message that I have successfully built the package and is ready for distribution. If I untar the tar.gz with

2条回答
  •  青春惊慌失措
    2021-02-12 23:14

    Actually this could happen when the server you download from applies another round of GZip and the client you used to download the file doesn't read/respect the HTTP Content-Encoding header and stores the HTTP payload as it was on the wire.

    Although the file appears to have only the extension .tar.gz it is in fact .tar.gz.gz. after you run the gunzip once the file gets the extension .tar only but still this time running the tar command tar xf hello-0.2.tar recognizes the GZip format and implicitly runs the file through gunzip one more time before extracting.

    You can check this by running head hello-02.tar.gz and head hello-02.tar. GZip is a very binary format, whereas tar is quite human readable. If the .tar file appears "too binary" you have a doubly encoded file on your hands.

提交回复
热议问题