我在将固件从 1.187.35 更新到 1.187.36 时遇到此问题。升级时显示此错误消息:
Preparing to unpack .../linux-firmware_1.187.36_all.deb ...
Unpacking linux-firmware (1.187.36) over (1.187.35) ...
dpkg: error processing archive /var/cache/apt/archives/linux-firmware_1.187.36_all.deb (--unpack):
unable to open '/lib/firmware/ath11k/IPQ6018/hw1.0/m3_fw.mdt.dpkg-new': No such file or directory
No apport report written because the error message indicates an issue on the local system
update-initramfs: Generating /boot/initrd.img-5.15.0-60-generic
update-initramfs: Generating /boot/initrd.img-5.15.0-58-generic
update-initramfs: Generating /boot/initrd.img-5.13.0-52-generic
update-initramfs: Generating /boot/initrd.img-5.11.0-46-generic
Errors were encountered while processing:
/var/cache/apt/archives/linux-firmware_1.187.36_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我尝试使用以下命令解决:
sudo apt --fix-broken install
但错误是一样的。
尝试清理缓存并更新,但仍然面临同样的错误
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -f
sudo apt-get dist-upgrade
答案1
我曾有一个非常类似案例:
dpkg: error processing archive /var/cache/apt/archives/linux-firmware_1.187.37_all.deb (--unpack):
unable to install new version of '/lib/firmware/ath11k/WCN6855/hw2.1/amss.bin': No such file or directory
以下是我解决问题的方法:
切换到有问题的机器上的目录ath11k
的子目录:linux-firmware
cd /lib/linux-firmware/ath11k;
ls -la;
那东西有各种产品类型:
total 0
drwxrwxr-x 9 hasan hasan 180 Mar 19 21:39 ./
drwxrwxr-x 98 hasan hasan 8100 Mar 19 21:39 ../
drwxrwxr-x 3 hasan hasan 60 Mar 19 21:39 IPQ6018/
drwxrwxr-x 3 hasan hasan 60 Mar 19 21:39 IPQ8074/
drwxrwxr-x 3 hasan hasan 60 Mar 19 21:39 QCA6390/
drwxrwxr-x 3 hasan hasan 60 Mar 19 21:39 WCN6855/
OP 提到IPQ6018
。就我而言是的WCN6855
。
cd WCN6855;
ls -la;
它有一个子目录版本hw2.0
和一个指向它的符号链接hw2.1
:
total 12
drwxr-xr-x 3 root root 4096 Feb 24 2022 ./
drwxr-xr-x 6 root root 4096 Jan 26 16:11 ../
drwxr-xr-x 3 root root 4096 Mar 19 21:51 hw2.0/
lrwxrwxrwx 1 root root 5 Feb 18 2022 hw2.1 -> hw2.0/
这就是缺陷!!
就我而言,错误是'... /hw2.1/amss.bin': No such file or directory.
向内看hw2.0
……
cd hw2.0;
ls -la;
... 我们看:
total 6212
drwxr-xr-x 3 root root 4096 Mar 19 21:51 ./
drwxr-xr-x 3 root root 4096 Feb 24 2022 ../
drwxr-xr-x 3 root root 4096 May 29 2022 1.1/
lrwxrwxrwx 1 root root 71 Mar 19 21:32 amss.bin -> 1.1/WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9/amss.bin
-rw-r--r-- 1 root root 6158196 Mar 19 21:51 board-2.bin
lrwxrwxrwx 1 root root 69 Mar 19 21:32 m3.bin -> 1.1/WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9/m3.bin
-rw-r--r-- 1 root root 152394 Mar 19 21:51 Notice.txt
-rw-r--r-- 1 root root 24310 Mar 19 21:51 regdb.bin
所以,amss.bin
是存在,但涉及三重符号链接链。
我只是删除了顶层符号链接,然后复制“hw2.0”来创建一个新目录“hw2.1”...
sudo rm hw2.1;
sudo cp -r hw2.0 hw2.1;
ls -la;
...离开:
total 16
drwxr-xr-x 4 root root 4096 Mar 19 21:57 ./
drwxr-xr-x 6 root root 4096 Jan 26 16:11 ../
drwxr-xr-x 3 root root 4096 Mar 19 21:52 hw2.0/
drwxr-xr-x 3 root root 4096 Mar 19 21:57 hw2.1/
我重新运行sudo apt upgrade
后问题就消失了。