Linux-Mint
如何讓 squashfs 和 XZ 工作?
我正在嘗試使用 Linux Mint,但我遇到了太多無法計算的問題。
我做的第一件事是安裝包(
apt install snap
),然後意識到它被阻止了。所以我按照Snapcraft 網站上的說明,刪除了/etc/apt/preferences.d/nosnap.pref
。然後我重新安裝它(apt purge snap; apt install snap
),重新啟動,然後執行snap install hello-world
。它下載了核心快照,當它嘗試安裝它時,它給了我這個錯誤消息:error: cannot perform the following tasks: - Mount snap "core" (10126) (cannot run unsquashfs: ----- Filesystem uses xz compression, this is unsupported by this version Decompressors available: gzip -----)
所以我去了squashfs LZMA 網站,下載了 tarball 並解壓了它。
當我跑的時候
make
,我得到了這些錯誤:cc -O2 -I. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DCOMP_DEFAULT=\"gzip\" -Wall -DGZIP_SUPPORT -DXZ_SUPPORT -DXATTR_SUPPORT -DXATTR_DEFAULT -c -o mksquashfs.o mksquashfs.c mksquashfs.c: In function 'create_inode': mksquashfs.c:987:24: error: called object 'major' is not a function or function pointer 987 | unsigned int major = major(buf->st_rdev); | ^~~~~ mksquashfs.c:987:16: note: declared here 987 | unsigned int major = major(buf->st_rdev); | ^~~~~ mksquashfs.c:988:24: error: called object 'minor' is not a function or function pointer 988 | unsigned int minor = minor(buf->st_rdev); | ^~~~~ mksquashfs.c:988:16: note: declared here 988 | unsigned int minor = minor(buf->st_rdev); | ^~~~~ mksquashfs.c:1011:24: error: called object 'major' is not a function or function pointer 1011 | unsigned int major = major(buf->st_rdev); | ^~~~~ mksquashfs.c:1011:16: note: declared here 1011 | unsigned int major = major(buf->st_rdev); | ^~~~~ mksquashfs.c:1012:24: error: called object 'minor' is not a function or function pointer 1012 | unsigned int minor = minor(buf->st_rdev); | ^~~~~ mksquashfs.c:1012:16: note: declared here 1012 | unsigned int minor = minor(buf->st_rdev); | ^~~~~ mksquashfs.c: In function 'dir_scan2': mksquashfs.c:3527:17: warning: implicit declaration of function 'makedev' [-Wimplicit-function-declaration] 3527 | buf.st_rdev = makedev(pseudo_ent->dev->major, | ^~~~~~~ make: *** [<builtin>: mksquashfs.o] Error 1
我對 C 不太了解,但如果我能找到一個 .deb 包或其他東西,那就太好了。我嘗試重新安裝 squashfs-tools,然後 snap,然後重新啟動,但這並沒有做任何事情。
有人可以給我一些指示嗎?
PS如果有更好的網站,請告訴我。
sudo apt install liblzma-dev zlib1g-dev git clone https://github.com/plougher/squashfs-tools.git cd squashfs-tools git checkout c570c6188811088b12ffdd9665487a2960c997a0 cd squashfs-tools sed -i 's/#XZ_SUPPORT/XZ_SUPPORT/' Makefile make -j$(nproc) make install