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.

  • are you familiar with non-desktop Linux? – qdii Sep 12 '13 at 1:53
  • which version of squashfs-tools have you downloaded? – qdii Sep 12 '13 at 1:57
  • 1
    The Ubuntu packages are lzma-dev or liblzma-dev not "devel". – msw Sep 12 '13 at 2:19
  • @qdii I'm most comfortable with embedded Linux. And I download squashfs-tools 4.2. – boltup_im_coding Sep 12 '13 at 16:57
5

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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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