需要安装的依赖项有zlib-devel、xz-devel.x86_64
修改Makefile文件以支持xz压缩的squashfs文件,去掉Makefile中 #XZ_SUPPORT = 1的#号
yum install -y zlib-devel xz-devel.x86_64 tar xzvf squashfs4.3.tar.gz cd squashfs4.3/squashfs-tools sed -i 's/#XZ_SUPPORT/XZ_SUPPORT/g' Makefile make && make install
如果没有安装zlib-devel会报错,提示
“...error: ‘Z_OK’ undeclared (first use in this function)...”
如果没有安装xz-devel.x86_64make&&make install不会报错,不过尝试解压xz压缩的文件会报错,提示
...‘LZMA_OK’ undeclared (first use in this function)...