前言
因為 樹莓派4b 是特例,到目前為止官方並沒有提供可以直接安裝在樹莓派 4b 的系統鏡像,而以前發布的版本對於 4b 這個新的型號也沒有提供較好的支持。
所以在 更新插件 或者 更新系統 可能會出現以下問題:
Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; apt-get update 2>&1' with exit code '100':
本文就這個問題提供解決方法。
具體問題
具體錯誤代碼,可以與你的代碼比較一下:
Server.java
Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; apt-get update 2>&1' with exit code '100': Get:1 file:/var/cache/openmediavault/archives InRelease Ign:1 file:/var/cache/openmediavault/archives InRelease Get:2 file:/var/cache/openmediavault/archives Release Ign:2 file:/var/cache/openmediavault/archives Release Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:3 file:/var/cache/openmediavault/archives Packages [1069 B] Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:5 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian buster InRelease [15.0 kB] Hit:6 http://mirrors.tuna.tsinghua.edu.cn/raspberrypi buster InRelease Get:7 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian buster/main Sources [11.4 MB] Err:7 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian buster/main Sources File has unexpected size (11350904 != 11350828). Mirror sync in progress? [IP: 183.222.102.76 80] Hashes of expected file: - Filesize:11350828 [weak] - SHA256:2080fdd5bfa43842d350f338f920c1bc537aa7f40a9095504772a7241ba52753 - SHA1:b6a1b284c7512b8ad0eea2618b2058bfcae1cb8b [weak] - MD5Sum:32b82c8547daaff00d223c8cb462acea [weak] Release file created at: Fri, 27 Mar 2020 22:51:18 +0000 Ign:9 https://dl.bintray.com/openmediavault-plugin-developers/usul buster InRelease Hit:10 https://download.docker.com/linux/debian buster InRelease Get:11 https://dl.bintray.com/openmediavault-plugin-developers/usul buster Release [4363 B] Hit:13 http://packages.openmediavault.org/public usul InRelease Fetched 4363 B in 13s (327 B/s) Reading package lists... E: Failed to fetch http://183.222.102.76/cache/mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/dists/buster/main/source/Sources.xz?ich_args2=392-28124503039578_574e8b1e35a7d749e734ef3666544963_10001002_9c896c29d4c4f1d6953a518939a83798_4a770034bf2db31bc5e0861b958e4fa3 File has unexpected size (11350904 != 11350828). Mirror sync in progress? [IP: 183.222.102.76 80] Hashes of expected file: - Filesize:11350828 [weak] - SHA256:2080fdd5bfa43842d350f338f920c1bc537aa7f40a9095504772a7241ba52753 - SHA1:b6a1b284c7512b8ad0eea2618b2058bfcae1cb8b [weak] - MD5Sum:32b82c8547daaff00d223c8cb462acea [weak] Release file created at: Fri, 27 Mar 2020 22:51:18 +0000 E: Failed to fetch http://183.222.102.65/cache/mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/dists/buster/main/binary-armhf/Packages.xz?ich_args2=392-28124513039608_af3257cb9619ae1550a259fa412a8924_10001002_9c896c29d4c4f1d6953a518939a83798_60c5e3374eaa05658ba5bf091e3e49ad E: Some index files failed to download. They have been ignored, or old ones used instead.
解決方法
現在找到的方法就是更新內核。
sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel
更新內核后,就可以 更新插件 或者 更新系統 。但是這種方法並不是一勞永逸的,下次依然可能會出現相同的問題,就要再次更新內核。
