[linux] tar: Error is not recoverable: exiting now

when I untar doctrine

-rw-r--r-- 1 root root 660252 2010-10-16 23:06 Doctrine-1.2.0.tgz

I always get this error messages

root@X100e:/usr/local/lib/Doctrine/stable# tar -xvzf Doctrine-1.2.0.tgz

.
.
.

Doctrine-1.2.0/tests/ViewTestCase.php
Doctrine-1.2.0/CHANGELOG

gzip: stdin: decompression OK, trailing garbage ignored
Doctrine-1.2.0/COPYRIGHT
Doctrine-1.2.0/LICENSE
tar: Child returned status 2
tar: Error is not recoverable: exiting now

The untar operation works, but I always get this error messages.

Any clues what I do wrong?

This question is related to linux doctrine compression gzip tar

The answer is


use sudo

sudo tar -zxvf xxxxxxxxx.tar.gz

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:

wget http://PATH_TO_ARCHIVE

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 ~]$ 

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).


Examples related to linux

grep's at sign caught as whitespace How to prevent Google Colab from disconnecting? "E: Unable to locate package python-pip" on Ubuntu 18.04 How to upgrade Python version to 3.7? Install Qt on Ubuntu Get first line of a shell command's output Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running? Run bash command on jenkins pipeline How to uninstall an older PHP version from centOS7 How to update-alternatives to Python 3 without breaking apt?

Examples related to doctrine

How do I delete an entity from symfony2 Order by multiple columns with Doctrine How to use andWhere and orWhere in Doctrine? How to encode Doctrine entities to JSON in Symfony 2.0 AJAX application? Doctrine 2: Update query with query builder tar: Error is not recoverable: exiting now Doctrine2: Best way to handle many-to-many with extra columns in reference table Get the last insert id with doctrine 2? Execute raw SQL using Doctrine 2 Doctrine - How to print out the real sql, not just the prepared statement?

Examples related to compression

Image steganography that could survive jpeg compression How to enable GZIP compression in IIS 7.5 Create a .tar.bz2 file Linux How are zlib, gzip and zip related? What do they have in common and how are they different? Create a tar.xz in one command Creating a ZIP archive in memory using System.IO.Compression How to compress an image via Javascript in the browser? How to reduce the image size without losing quality in PHP How to send a compressed archive that contains executables so that Google's attachment filter won't reject it How to reduce the image file size using PIL

Examples related to gzip

gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now How to unzip gz file using Python How to enable GZIP compression in IIS 7.5 Using GZIP compression with Spring Boot/MVC/JavaConfig with RESTful How are zlib, gzip and zip related? What do they have in common and how are they different? How to uncompress a tar.gz in another directory compression and decompression of string data in java Extract and delete all .gz in a directory- Linux How to extract filename.tar.gz file Read from a gzip file in python

Examples related to tar

gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now Create a .tar.bz2 file Linux what does -zxvf mean in tar -zxvf <filename>? tar: file changed as we read it Create a tar.xz in one command How to tar certain file types in all subdirectories? Tar a directory, but don't store full absolute paths in the archive How to uncompress a tar.gz in another directory How to extract filename.tar.gz file Utilizing multi core for tar+gzip/bzip compression/decompression