Debian Linux上的tar错误


2

我下载了Firefox压缩包。当我尝试提取时Firefox-latest.tar.bz2

sudo tar -jxvf Firefox-latest.tar.bz2

终端上出现一些错误:

tar: .: Not found in archive
tar: Exiting with failure status due to previous errors

然后我尝试命令:

sudo tar -jxf Firefox-latest.tar.bz2

还是错误!

所以,我该如何解决这个错误?为什么会发生?


没有须藤?它行得通吗?
Tomas 2012年

当我使用没有sudo的root帐户,但仍然出错时

Answers:


2

如果下载不完整,则错误应该是类似

$ tar jxvf firefox-12.0.tar.bz2
firefox/
firefox/mozilla-xremote-client
firefox/platform.ini
firefox/libsoftokn3.chk
firefox/libnssckbi.so
firefox/libxul.so

bzip2: Compressed file ends unexpectedly;
    perhaps it is corrupted?  *Possible* reason follows.
bzip2: Inappropriate ioctl for device
    Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

但是,您描述的输出正是执行以下命令后得到的结果:

$ tar jxvf firefox-12.0.tar.bz2 .
tar: .: Not found in archive
tar: Exiting with failure status due to previous errors

我相信您.出于某种原因而拖了一条路。也许因为你以为你以这种方式来指定提取目录(你可以用指定它-C,如果你想要的,但.是默认值)。


问题已经解决,您是对的,我不应该这样指定提取目录,您的方法是对的,谢谢!
YoungkingWang 2012年

@YoungkingWang:如果此答案解决了问题,则应通过单击旁边的对勾标记将其标记为正确。该站点依靠解决问题时将其标记为“已回答”的问题。
丹尼尔·安德森


0

文件下载是否完整且没有错误和正确的大小?如果您运行“ file Firefox-latest.tar.bz2”,将返回什么?


Firefox文件完整无误,因为我可以使用gnome提取工具提取该文件,但无法在终端上提取它,所以我该怎么办
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.