Tell me more ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm trying to extract a tar.xz file with tar in Mac OS X Lion. I'm using bsdtar 2.8.3 - libarchive 2.8.3. I'm able to use tar to extract anything else I've tried (.zip, .tar, .tar.gz, etc.), but when I try to extract the file (this file to be precise) using tar -Jxf cclive-0.7.11.tar.xz, I get this error:

tar: Error opening archive: Child process exited with status 254Child process exited with status 254
share|improve this question

1 Answer

up vote 4 down vote accepted

Same error here (tried GNU tar and the one included in OS X).

You are missing the xz compression program which tar tries to use.

Either install a precompiled xz from Sourceforge or, if you are like me, download the source from http://tukaani.org/xz/ and compile it yourself:

$ ./configure
$ make
$ sudo make install

(Unless told otherwise, ./configure installs xz in /usr/local/bin. You possibly want to add it to $PATH.)

Then:

$ xz --decompress cclive-0.7.11.tar.xz
$ l cclive-0.7.11.tar 
-rw-r--r-- 1 jaume 1832960 2012-12-12 15:18 cclive-0.7.11.tar

Now untar as usual:

$ tar xf cclive-0.7.11.tar
share|improve this answer
1  
brew install xz also works if you are already using homebrew – alanning Mar 1 at 16:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.