4

I'm using Ubuntu 12.04. I want to unsquash an lzma image. I have done

sudo apt-get squashfs-tools

Now, when I do

unsquashfs <squashed_image_filename>

I get

Filesystem uses lzma compression, this is unsupported by this version

I know my squashed image is lzma. How do I install support for lzma? I have downloaded the squashfs-tools from here: http://sourceforge.net/projects/squashfs/files/

It is my understanding that after extracting that tarball, I need to cd into squashfs4.2/squashfs-tools and edit the Makefile by uncommenting the line LZMA_XZ_SUPPORT = 1. Then I just need to run make.

That does not work for me. I get the error:

gzip_wrapper.c:23:18: fatal error: zlib.: No such file or directory

I think I need to install lzma-devel and xz-devel. I have tried this and been Googling for a couple hours and haven't gotten anywhere or found any solid instructions that show how this should work. Can anyone who has done this help me out? I am new to desktop Linux so if you could be fairly verbose in your instructions that would be appreciated.

Anthon
  • 79,293

2 Answers2

6

Thanks to @msw, I figured out the package names for Ubuntu. Thank you! Here's the full steps for someone in the future.

Get source here: http://sourceforge.net/projects/squashfs/

# sudo apt-get install lzma-dev
# sudo apt-get install liblzma-dev
# tar -zxvf squashfs4.2.tar.gz
# cd squashfs4.2/squashfs-tools: Edit Makefile and uncomment this line "LZMA_XZ_SUPPORT = 1"
# make
# sudo make install
# sudo unsquashfs <path/lzma_filename_to_unsquash>
0

For anyone coming here looking for squashfs with lzma support, it seems that in Ubuntu 22.10:

  • The kernel (5.19.0) does not support mounting LZMA-compressed squashfs images:
    Filesystem uses "lzma" compression. This is not supported
    
  • The unsquashfs tool from the squashfs-tools (version 1:4.5.1-1) does support LZMA without any special options.