Ubuntu

錯誤 24:寫入錯誤:無法寫入壓縮塊

  • June 29, 2020

我正在使用 Ubuntu 20.04 LTS 伺服器並用我的更新檔重新編譯了整個核心。現在處於安裝階段,但是當我執行時,sudo make install我看到以下錯誤,

root@localhost:/home/linux-5.4# sudo make install
sh ./arch/x86/boot/install.sh 5.4.0 arch/x86/boot/bzImage \
       System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.4.0 /boot/vmlinuz-5.4.0
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.4.0 /boot/vmlinuz-5.4.0
update-initramfs: Generating /boot/initrd.img-5.4.0
Error 24 : Write error : cannot write compressed block
E: mkinitramfs failure cpio 141 lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.4.0 with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
make[1]: *** [arch/x86/boot/Makefile:155: install] Error 1
make: *** [arch/x86/Makefile:293: install] Error 2

這是我的伺服器上剩餘多少空間與df -i命令,

Filesystem      Inodes  IUsed   IFree IUse% Mounted on
udev            114642    367  114275    1% /dev
tmpfs           125596    500  125096    1% /run
/dev/sda       1568000 271637 1296363   18% /
tmpfs           125596      4  125592    1% /dev/shm
tmpfs           125596      3  125593    1% /run/lock
tmpfs           125596     18  125578    1% /sys/fs/cgroup

df-h輸出,

   Filesystem      Size  Used Avail Use% Mounted on
   udev            448M     0  448M   0% /dev
   tmpfs            99M   12M   87M  12% /run
   /dev/sda         25G   22G  2.2G  92% /
   tmpfs           491M     0  491M   0% /dev/shm
   tmpfs           5.0M     0  5.0M   0% /run/lock
   tmpfs           491M     0  491M   0% /sys/fs/cgroup

值得注意的是 df-h 之前是一長串文件名,現在可以正確列印。

我先安裝核心,然後執行 make clean,然後繼續安裝模組。這種方法節省了所需的空間。

引用自:https://unix.stackexchange.com/questions/595375