5

How can I unzip a .xz file? Archive utility failed. Is there an app that I should get to do it? (Mac Pro, OS X Yosemite 10.10.5)

Matt
  • 749
  • 1
    https://apple.stackexchange.com/a/233635/21339 says gunzip works on .xz files. I've tested it on High Sierra 10.13.6. Does it work on Yosemite? – mwfearnley Nov 13 '19 at 12:27
  • https://www.ctrl.blog/entry/archive-utility-xz.html suggests that Archive Uitlity can handle .tar.xz files in Yosemite, so maybe gunzip gained general xz support at the same time? – mwfearnley Nov 13 '19 at 12:45

2 Answers2

4

I would give The Unarchiver a go. You can download it directly or, if you prefer, via the Mac App Store.

Note: I am not affiliated with this product.

Monomeeth
  • 64,558
1

In Mavericks (10.9.5), you can use gunzip in a terminal to extract .xz files - so it is sure to also work on Yosemite.


Note: The library liblzma is required to extract .xz files.

Prior to Mavericks, .xz can not be extracted by the native gunzip on OS X because this library is not present. For example, OS X Mountain Lion does not have /usr/lib/liblzma.dylib, nor /usr/lib/liblzma.5.dylib, see this post and the table from this post.

This post states:

As this StackOverflow answer rightly points out, the xz/lzma feature of bsdtar is configurable at compile time. The feature is present back to macOS 10.7, but it is configured off until macOS 10.9.

Also of interest, from this post:

Found some info about OS X and libarchive versions. According to this: https://opensource.apple.com/

OS X 10.6.x shipped with libarchive 2.6.2. And OS X 10.7.x shipped with libarchive 2.8.3.

(2.8.3 is still used in Mojave, albeit with various, minor-looking, darwin-specific patches accumulated over the years if I understand correctly. For example, see libarchive.plist from macOS Mojave 10.14.5 for details.)

For more information, read this thread: XZ compression support #8

Greenonline
  • 2,004