Download and install: Can't unzip or extract .xz

Hi, Am I doing something stupid?

Trying to download mate for raspi 3. Since my RasPi doesn’t have an OS yet, I’m doing it on mac or windows. I just want to get an image file or iso that I can then put on a microSD etc. to load onto the pi, but can’t even get past the first step.

I go to downloads page and get the img.xz file for raspi, but can’t extract/unzip it.

None of these worked:

–unarchiver, keka, 7-zip, archive utility, and every command I could find on terminal
–both macOs and windows 7
–downloading in multiple browsers and via torrent

Thanks.

7-zip should be able to extract from a .xz file.

If it doesn’t, then install xz on your OSX.

http://macappstore.org/xz/

That should allow you to extract the img file.

I find peazip works well for Windows
Derek

The command to decompress with xz would be:

unxz ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img.xz

See here for more information:

https://ubuntu-mate.org/raspberry-pi/

And the man page for xz is located here:

https://linux.die.net/man/1/xz

Thanks everyone who responded! Appreciate it.

Sadly, neither 7-zip nor xz worked. xz says “file format not recognized”. I’ll try peazip now.

Update: Peazip and xz both worked!

The trick was to download the file again from the website every single time I tried to unzip it. But for example if I downloaded it and it failed with 7-zip, then unzipping the same file with peazip or xz didn’t work even though 7-zip didn’t seem to modify the file.

But once I downloaded the file again, then used peazip, it worked. Same: if I downloaded it again and then ran xz.

It was always the same file from the same site, and the download appeared to work fine every time, so I think somehow the failed try (regardless of program) was corrupting it.

Thanks again all. This was really bugging me and am gald be able to get started.

3 Likes

There are warnings inplaces about trying to unzip/unpack before you use the ‘proper’ tool - presumably because of this sort of thing. I, personally, haven’t had the problem (yet)
Derek

Glad it’s working :thumbsup: I’d also say it’s likely the file was getting corrupt somehow – whether by transit, a program, or the storage medium it was being saved to.

There is a way to check a download is bit-by-bit perfect by performing a SHA256 checksum. The download page lists one like this:

dc3afcad68a5de3ba683dc30d2093a3b5b3cd6b2c16c0b5de8d50fede78f75c2

If you’re using Mac/Linux, you can do that right in from the terminal:

sha256sum ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img.xz

They should match - and should help identify corrupt downloads in future. :slight_smile:

1 Like

That’s really helpful, thanks! I will definitely make use of that in the future.

drop the .xz right onto Etcher and it will flash to your SD card correctly. Etcher is an SD card flash from an ISO type file.