tar: Error is not recoverable: exiting now
I would try to unzip and untar separately and see what happens:
mv Doctrine-1.2.0.tgz Doctrine-1.2.0.tar.gz gunzip Doctrine-1.2.0.tar.gz tar xf Doctrine-1.2.0.tar
I encountered this error today when trying to unzip and untar mediawiki-1.18.0.tar.gz . I re-downloaded mediawiki-1.18.0.tar.gz and the errors stopped, so I assume the file must have been corrupted during the initial download.
It’s possible your tar file is not zipped. I just had this same error, but all I had was a plain old tar file. So try just removing the z from your flags. The z flag unzips your tar file as well as whatever other commands you requested with other flags. i.e. try:
Notice I removed the z from -xvzf
If you got «Error is not recoverable: exiting now» You might have specified incorrect path references.
[me@host ~]$ tar -xvf nameOfMyTar.tar -C /someSubDirectory/ tar: /someSubDirectory: Cannot open: No such file or directory tar: Error is not recoverable: exiting now [me@host ~]$
Make sure you provide correct relative or absolute directory references e.g.:
[me@host ~]$ tar -xvf ./nameOfMyTar.tar -C ./someSubDirectory/ ./foo/ ./bar/ [me@host ~]$
Right, I don’t answer the users specific question, but the error message in the title is the same as mine.
Try to get your archive using wget , I had the same issue when I was downloading archive through browser. Than I just copy archive link and in terminal use the command:
The problem is that you do not have bzip2 installed. The tar program relies upon this external program to do compression. For installing bzip2, it depends on the system you are using. For example, with Ubuntu that would be on Ubuntu
sudo apt-get install bzip2
The GNU tar program does not know how to compress an existing file such as user-logs.tar (bzip2 does that). The tar program can use external compression programs gzip, bzip2, xz by opening a pipe to those programs, sending a tar archive via the pipe to the compression utility, which compresses the data which it reads from tar and writes the result to the filename which the tar program specifies.
Alternatively, the tar and compression utility could be the same program. BSD tar does its compression using lib archive (they’re not really distinct except in name).
tar: не может открыть: нет такого файла или каталога
Я пытаюсь следовать инструкциям здесь, чтобы установить Jetty на Ubuntu, но у меня возникает проблема, когда я пытаюсь использовать tar.
cd /usr/local/src sudo wget http://eclipse.org/downloads/download.php?file=/jetty/stable-9/dist/jetty-distribution-9.1.0.v20131115.tar.gz&r=1
sudo tar -xfz etty-distribution-9.1.0.v20131115.tar.gz
tar: z: Cannot open: No such file or directory tar: Error is not recoverable: exiting now
Что я делаю неправильно? (Я тоже пробовал как root но это не помогло) РЕДАКТИРОВАТЬ Ни один из предложенных ответов не работает для меня. Ниже я копирую свои попытки из командной строки. Что я делаю неправильно?
a@b:/usr/local/src$ ls download.php?file=%2Fjetty%2F9.1.0.v20131115%2Fdist%2Fjetty-distribution-9.1.0.v20131115.tar.gz download.php?file=%2Fjetty%2Fstable-9%2Fdist%2Fjetty-distribution-9.1.0.v20131115.tar.gz a@b:/usr/local/src$ tar -tfz jetty-distribution-9.1.0.v20131115.tar.gz tar: z: Cannot open: No such file or directory tar: Error is not recoverable: exiting now a@b:/usr/local/src$ tar -tfz /usr/local/src/jetty-distribution-9.1.0.v20131115.tar.gz tar: z: Cannot open: No such file or directory tar: Error is not recoverable: exiting now a@b:/usr/local/src$ sudo tar xfz download.php?file=%2Fjetty%2F9.1.0.v20131115%2Fdist%2Fjetty-distribution-9.1.0.v20131115.tar.gz gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now a@b:/usr/local/src$ sudo tar xfz jetty-distribution-9.1.0.v20131115.tar.gztar (child): jetty-distribution-9.1.0.v20131115.tar.gz: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now a@b:/usr/local/src$ ^C a@b:/usr/local/src$
tar: cannot open: no such file or directory
I am trying to follow the instructions here to install Jetty on ubuntu but I am running into a problem when I try to use tar.
cd /usr/local/src sudo wget http://eclipse.org/downloads/download.php?file=/jetty/stable-9/dist/jetty-distribution-9.1.0.v20131115.tar.gz&r=1
sudo tar -xfz etty-distribution-9.1.0.v20131115.tar.gz
tar: z: Cannot open: No such file or directory tar: Error is not recoverable: exiting now
What am I doing wrong? (I also tried as root but it did not help) EDIT None of the suggested answers is working for me. Below I copy my attempts from the command line. What am I doing wrong?
a@b:/usr/local/src$ ls download.php?file=%2Fjetty%2F9.1.0.v20131115%2Fdist%2Fjetty-distribution-9.1.0.v20131115.tar.gz download.php?file=%2Fjetty%2Fstable-9%2Fdist%2Fjetty-distribution-9.1.0.v20131115.tar.gz a@b:/usr/local/src$ tar -tfz jetty-distribution-9.1.0.v20131115.tar.gz tar: z: Cannot open: No such file or directory tar: Error is not recoverable: exiting now a@b:/usr/local/src$ tar -tfz /usr/local/src/jetty-distribution-9.1.0.v20131115.tar.gz tar: z: Cannot open: No such file or directory tar: Error is not recoverable: exiting now a@b:/usr/local/src$ sudo tar xfz download.php?file=%2Fjetty%2F9.1.0.v20131115%2Fdist%2Fjetty-distribution-9.1.0.v20131115.tar.gz gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now a@b:/usr/local/src$ sudo tar xfz jetty-distribution-9.1.0.v20131115.tar.gztar (child): jetty-distribution-9.1.0.v20131115.tar.gz: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now a@b:/usr/local/src$ ^C a@b:/usr/local/src$
tar shows «is not a bzip2 file» error when uncompressing a .tar.bz file
maybe it was wrongly named? if you feel lucky try tar xzvf . or tar xvf . — otherwise maybe a look into the head may reveal details.
Try file data_or.tar.bz which should tell you if the file is simply a mis-named archive of a different type.
2 Answers 2
Your tarball is uncompressed. The extension .bz is obsolete and misleading.
You can decompress using the following command:
What probably happened here is that data_or.tar.bz was created with the —auto-compress switch (or tar -cavf ) that chooses the compression algorithm from the supplied extension.
The proper extension for bzip2 compressed files is .bz2 , while the .bz extension is for bzip compressed files.
bzip uses arithmetic encoding (which is a patented algorithm), so bzip2 was created in 1997 as a patent-free alternative. As a result, bzip2 and bzip are incompatible.
tar cannot handle bzip (de)compression, so the —auto-compress switch resulted in an uncompressed tarball.
tar -xvjf file.tar.bz2 >> Because the flag ‘j’ is used, tar command will call bzip2 to process the decompression.
bzip2: (stdin) is not a bzip2 file. >> bzip2 reported to parent process (tar) that the received file to process is NOT bz2 format
tar: Child returned status 2 >> tar reports the error status received from bzip2 child process by exiting execution. In man documentation, error status means «2 to indicate a corrupt compressed file». As bzip2 did not recognized the format, it reports it as ‘corrupt’
tar: Error is not recoverable: exiting now >> According to message received from child, compressed file is not accepted for processing
Steps to fixing the issue:
1- verify the format of the compression
POSIX tar archive (GNU) — «Or whatever other format», then correct it with the next step 2
2- tar -xvf file.tar.bz2 — «in case its a posix tar archive format»
tar throws error when extracting file
When I run that command, I get the error that it cannot open the file. I don’t know why. Can anyone help me with this?
1 Answer 1
daq-2.0.4.tar.qz is not the name of the file that you downloaded, it is daq-2.0.4.tar.gz with a .gz extension, so the command tar -zxvf /root/Desktop/daq-2.0.4.tar.qz can’t find it.
Change directories using cd to the directory containing daq-2.0.4.tar.gz and run this command:
tar -zxvf daq-2.0.4.tar.gz
I downloaded daq-2.0.4.tar.gz from the above link to my desktop and extracted it with the above command and it worked. Results:
daq-2.0.4/ daq-2.0.4/os-daq-modules/ daq-2.0.4/os-daq-modules/daq-modules-config.in daq-2.0.4/os-daq-modules/daq_nfq.c daq-2.0.4/os-daq-modules/daq_netmap.c daq-2.0.4/os-daq-modules/daq_dump.c daq-2.0.4/os-daq-modules/daq_static_modules.h daq-2.0.4/os-daq-modules/Makefile.in daq-2.0.4/os-daq-modules/daq_ipq.c daq-2.0.4/os-daq-modules/daq_ipfw.c daq-2.0.4/os-daq-modules/daq_pcap.c daq-2.0.4/os-daq-modules/daq_static_modules.c daq-2.0.4/os-daq-modules/daq_afpacket.c daq-2.0.4/os-daq-modules/Makefile.am daq-2.0.4/api/ daq-2.0.4/api/daq.h daq-2.0.4/api/daq_mod_ops.c daq-2.0.4/api/daq_api.h daq-2.0.4/api/daq_common.h daq-2.0.4/api/daq_base.c daq-2.0.4/api/Makefile.in daq-2.0.4/api/Makefile.am daq-2.0.4/COPYING daq-2.0.4/README daq-2.0.4/sfbpf/ daq-2.0.4/sfbpf/win32-stdinc.h daq-2.0.4/sfbpf/sf_gencode.c daq-2.0.4/sfbpf/sfbpf-int.c daq-2.0.4/sfbpf/ipnet.h daq-2.0.4/sfbpf/sfbpf-int.h daq-2.0.4/sfbpf/IP6_misc.h daq-2.0.4/sfbpf/sfbpf.h daq-2.0.4/sfbpf/nlpid.h daq-2.0.4/sfbpf/sf-redefines.h daq-2.0.4/sfbpf/grammar.y daq-2.0.4/sfbpf/ethertype.h daq-2.0.4/sfbpf/ieee80211.h daq-2.0.4/sfbpf/sf_optimize.c daq-2.0.4/sfbpf/arcnet.h daq-2.0.4/sfbpf/ppp.h daq-2.0.4/sfbpf/sfbpf_dlt.h daq-2.0.4/sfbpf/llc.h daq-2.0.4/sfbpf/scanner.l daq-2.0.4/sfbpf/Makefile.in daq-2.0.4/sfbpf/sll.h daq-2.0.4/sfbpf/sunatmpos.h daq-2.0.4/sfbpf/sf_bpf_printer.c daq-2.0.4/sfbpf/sf_nametoaddr.c daq-2.0.4/sfbpf/runlex.sh daq-2.0.4/sfbpf/namedb.h daq-2.0.4/sfbpf/sf_bpf_filter.c daq-2.0.4/sfbpf/gencode.h daq-2.0.4/sfbpf/bittypes.h daq-2.0.4/sfbpf/atmuni31.h daq-2.0.4/sfbpf/Makefile.am daq-2.0.4/config.sub daq-2.0.4/daq.dsp daq-2.0.4/configure daq-2.0.4/ChangeLog daq-2.0.4/ltmain.sh daq-2.0.4/install-sh daq-2.0.4/config.h.in daq-2.0.4/aclocal.m4 daq-2.0.4/depcomp daq-2.0.4/Makefile.in daq-2.0.4/m4/ daq-2.0.4/m4/ltoptions.m4 daq-2.0.4/m4/ax_cflags_gcc_option.m4 daq-2.0.4/m4/libtool.m4 daq-2.0.4/m4/lt~obsolete.m4 daq-2.0.4/m4/ltversion.m4 daq-2.0.4/m4/ltsugar.m4 daq-2.0.4/m4/sf.m4 daq-2.0.4/configure.ac daq-2.0.4/config.guess daq-2.0.4/missing daq-2.0.4/Makefile.am