I had a very similar case:
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
Here's how I solved it:
Switch to the ath11k
subdirectory of linux-firmware
directory on the troubled machine:
cd /lib/linux-firmware/ath11k;
ls -la;
That thing has various product types:
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/
The OP mentions IPQ6018
. In my case it was WCN6855
.
cd WCN6855;
ls -la;
That has a subdirectory version hw2.0
and a symlink to back to it called 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/
That is the defect!!
In my case the error was '... /hw2.1/amss.bin': No such file or directory.
Looking within hw2.0
...
cd hw2.0;
ls -la;
... we see:
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
So, amss.bin
is present, but there's a triple symlink chain involved.
I simply deleted the top level symlink and then copied 'hw2.0' to create a new directory 'hw2.1' ...
sudo rm hw2.1;
sudo cp -r hw2.0 hw2.1;
ls -la;
... leaving:
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/
I reran the sudo apt upgrade
and the problem went away.