Unable to unzip tar.gz on ubuntu VM
执行以下步骤:
第五步后,我得到了错误:
gzip:stdin:非gzip格式
tar:子级返回状态1
tar:错误无法恢复:现在退出
可能是什么问题呢? 在我的本地Mac机器上,相同的命令起作用。
从手册页引用:
--format=
Format of the resulting archive: tar or zip. If this option is not given, and the output file is specified, the format is inferred from the filename if possible (e.g. writing to"foo.zip" makes the output to be in the zip format). Otherwise the output format is tar.
因此,您可能得到了一个.tar文件,该文件未压缩,而只是命名为.tar.gz。
尝试不使用-z参数。
您是否尝试将其列出(不起作用)?
1 | tar -ztf version-$SHA.tar.gz |
要Gunzip吗?
1 | gunzip version-$SHA.tar.gz |
要解压缩它(如果未压缩)?
1 | tar xf version-$SHA.tar.gz |
尝试过Bunzip吗?
1 | tar xjf version-$SHA.tar.gz |
试图解压缩?
1 | unzip version-$SHA.tar.gz |
文件不是不为空(空tar约为10Kio)?
1 | ls -lk version-$SHA.tar.gz |
如果都不起作用,您可以这样做:
1 | file version-$SHA.tar.gz |