Using ubuntu mate on rpi 4b. Faced this same issue today when I upgraded the package.
Selecting previously unselected package linux-firmware-raspi2.
Preparing to unpack .../63-linux-firmware-raspi2_4-0ubuntu0~20.04.1_arm64.deb ...
dpkg-divert: error: 'diversion of /lib/firmware/brcm/brcmfmac43455-sdio.bin to /lib/firmware/brcm/brcmfmac43455-sdio.bin.distrib by linux-firmware-raspi2' clashes with 'diversion of /lib/firmware/brcm/brcmfmac43455-sdio.bin to /lib/firmware/brcm/brcmfmac43455-sdio.bin.distrib by pi-bluetooth'
dpkg: error processing archive /tmp/apt-dpkg-install-8lVGqH/63-linux-firmware-raspi2_4-0ubuntu0~20.04.1_arm64.deb (--unpack):
new linux-firmware-raspi2 package pre-installation script subprocess returned error exit status 2
No diversion 'diversion of /lib/firmware/brcm/brcmfmac43430-sdio.clm_blob by linux-firmware-raspi2', none removed.
No diversion 'diversion of /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.txt by linux-firmware-raspi2', none removed.
No diversion 'diversion of /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,400.txt by linux-firmware-raspi2', none removed.
No diversion 'diversion of /lib/firmware/brcm/brcmfmac43436-sdio.bin by linux-firmware-raspi2', none removed.
No diversion 'diversion of /lib/firmware/brcm/brcmfmac43436-sdio.clm_blob by linux-firmware-raspi2', none removed.
No diversion 'diversion of /lib/firmware/brcm/brcmfmac43436-sdio.txt by linux-firmware-raspi2', none removed.
No diversion 'diversion of /lib/firmware/brcm/brcmfmac43455-sdio.clm_blob by linux-firmware-raspi2', none removed.
No diversion 'diversion of /lib/firmware/brcm/brcmfmac43456-sdio.bin by linux-firmware-raspi2', none removed.
No diversion 'diversion of /lib/firmware/brcm/brcmfmac43456-sdio.clm_blob by linux-firmware-raspi2', none removed.
No diversion 'diversion of /lib/firmware/brcm/brcmfmac43456-sdio.raspberrypi,4-model-b.txt by linux-firmware-raspi2', none removed.
No diversion 'diversion of /lib/firmware/brcm/brcmfmac43456-sdio.raspberrypi,4-compute-module.txt by linux-firmware-raspi2', none removed.
No diversion 'diversion of /lib/firmware/brcm/brcmfmac43456-sdio.raspberrypi,400.txt by linux-firmware-raspi2', none removed.
No diversion 'diversion of /lib/firmware/brcm/brcmfmac43430-sdio.bin by linux-firmware-raspi2', none removed.
No diversion 'diversion of /lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt by linux-firmware-raspi2', none removed.
dpkg-divert: error: mismatch on package
when removing 'diversion of /lib/firmware/brcm/brcmfmac43455-sdio.bin by linux-firmware-raspi2'
found 'diversion of /lib/firmware/brcm/brcmfmac43455-sdio.bin to /lib/firmware/brcm/brcmfmac43455-sdio.bin.distrib by pi-bluetooth'
dpkg: error while cleaning up:
new linux-firmware-raspi2 package post-removal script subprocess returned error exit status 2
Preparing to unpack .../64-linux-libc-dev_5.4.0-73.82_arm64.deb ...
Unpacking linux-libc-dev:arm64 (5.4.0-73.82) over (5.4.0-72.80) ...
Preparing to unpack .../65-openvpn_2.4.7-1ubuntu2.20.04.2_arm64.deb ...
Unpacking openvpn (2.4.7-1ubuntu2.20.04.2) over (2.4.7-1ubuntu2) ...
Preparing to unpack .../66-pi-bluetooth_0.1.15ubuntu0~20.04.1_arm64.deb ...
Unpacking pi-bluetooth (0.1.15ubuntu0~20.04.1) over (0.1.10ubuntu6-lobo) ...
dpkg: warning: unable to delete old directory '/lib/firmware/brcm': Directory not empty
Preparing to unpack .../67-python3-pip_20.0.2-5ubuntu1.5_all.deb ...
Unpacking python3-pip (20.0.2-5ubuntu1.5) over (20.0.2-5ubuntu1.1) ...
Preparing to unpack .../68-python-pip-whl_20.0.2-5ubuntu1.5_all.deb ...
Unpacking python-pip-whl (20.0.2-5ubuntu1.5) over (20.0.2-5ubuntu1.1) ...
Preparing to unpack .../69-python3-problem-report_2.20.11-0ubuntu27.17_all.deb ...
Unpacking python3-problem-report (2.20.11-0ubuntu27.17) over (2.20.11-0ubuntu27.16) ...
Preparing to unpack .../70-python3-apport_2.20.11-0ubuntu27.17_all.deb ...
Unpacking python3-apport (2.20.11-0ubuntu27.17) over (2.20.11-0ubuntu27.16) ...
Preparing to unpack .../71-python3-pil_7.0.0-4ubuntu0.4_arm64.deb ...
Unpacking python3-pil:arm64 (7.0.0-4ubuntu0.4) over (7.0.0-4ubuntu0.3) ...
Preparing to unpack .../72-software-properties-common_0.98.9.5_all.deb ...
Unpacking software-properties-common (0.98.9.5) over (0.98.9.4) ...
Preparing to unpack .../73-software-properties-gtk_0.98.9.5_all.deb ...
Unpacking software-properties-gtk (0.98.9.5) over (0.98.9.4) ...
Preparing to unpack .../74-python3-software-properties_0.98.9.5_all.deb ...
Unpacking python3-software-properties (0.98.9.5) over (0.98.9.4) ...
Errors were encountered while processing:
/tmp/apt-dpkg-install-8lVGqH/63-linux-firmware-raspi2_4-0ubuntu0~20.04.1_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Using ubuntu mate on rpi 4b. Faced this same issue today when I upgraded the package.
Selecting previously unselected package linux-firmware- raspi2. linux-firmware- raspi2_ 4-0ubuntu0~ 20.04.1_ arm64.deb ... brcm/brcmfmac43 455-sdio. bin to /lib/firmware/ brcm/brcmfmac43 455-sdio. bin.distrib by linux-firmware- raspi2' clashes with 'diversion of /lib/firmware/ brcm/brcmfmac43 455-sdio. bin to /lib/firmware/ brcm/brcmfmac43 455-sdio. bin.distrib by pi-bluetooth' dpkg-install- 8lVGqH/ 63-linux- firmware- raspi2_ 4-0ubuntu0~ 20.04.1_ arm64.deb (--unpack): raspi2 package pre-installation script subprocess returned error exit status 2 brcm/brcmfmac43 430-sdio. clm_blob by linux-firmware- raspi2' , none removed. brcm/brcmfmac43 455-sdio. raspberrypi, 4-compute- module. txt by linux-firmware- raspi2' , none removed. brcm/brcmfmac43 455-sdio. raspberrypi, 400.txt by linux-firmware- raspi2' , none removed. brcm/brcmfmac43 436-sdio. bin by linux-firmware- raspi2' , none removed. brcm/brcmfmac43 436-sdio. clm_blob by linux-firmware- raspi2' , none removed. brcm/brcmfmac43 436-sdio. txt by linux-firmware- raspi2' , none removed. brcm/brcmfmac43 455-sdio. clm_blob by linux-firmware- raspi2' , none removed. brcm/brcmfmac43 456-sdio. bin by linux-firmware- raspi2' , none removed. brcm/brcmfmac43 456-sdio. clm_blob by linux-firmware- raspi2' , none removed. brcm/brcmfmac43 456-sdio. raspberrypi, 4-model- b.txt by linux-firmware- raspi2' , none removed. brcm/brcmfmac43 456-sdio. raspberrypi, 4-compute- module. txt by linux-firmware- raspi2' , none removed. brcm/brcmfmac43 456-sdio. raspberrypi, 400.txt by linux-firmware- raspi2' , none removed. brcm/brcmfmac43 430-sdio. bin by linux-firmware- raspi2' , none removed. brcm/brcmfmac43 430-sdio. raspberrypi, 3-model- b.txt by linux-firmware- raspi2' , none removed. brcm/brcmfmac43 455-sdio. bin by linux-firmware- raspi2' brcm/brcmfmac43 455-sdio. bin to /lib/firmware/ brcm/brcmfmac43 455-sdio. bin.distrib by pi-bluetooth' raspi2 package post-removal script subprocess returned error exit status 2 linux-libc- dev_5.4. 0-73.82_ arm64.deb ... dev:arm64 (5.4.0-73.82) over (5.4.0-72.80) ... openvpn_ 2.4.7-1ubuntu2. 20.04.2_ arm64.deb ... 1ubuntu2. 20.04.2) over (2.4.7-1ubuntu2) ... pi-bluetooth_ 0.1.15ubuntu0~ 20.04.1_ arm64.deb ... 20.04.1) over (0.1.10ubuntu6- lobo) ... brcm': Directory not empty python3- pip_20. 0.2-5ubuntu1. 5_all.deb ... python- pip-whl_ 20.0.2- 5ubuntu1. 5_all.deb ... python3- problem- report_ 2.20.11- 0ubuntu27. 17_all. deb ... problem- report (2.20.11- 0ubuntu27. 17) over (2.20.11- 0ubuntu27. 16) ... python3- apport_ 2.20.11- 0ubuntu27. 17_all. deb ... 0ubuntu27. 17) over (2.20.11- 0ubuntu27. 16) ... python3- pil_7.0. 0-4ubuntu0. 4_arm64. deb ... software- properties- common_ 0.98.9. 5_all.deb ... properties- common (0.98.9.5) over (0.98.9.4) ... software- properties- gtk_0.98. 9.5_all. deb ... properties- gtk (0.98.9.5) over (0.98.9.4) ... python3- software- properties_ 0.98.9. 5_all.deb ... software- properties (0.98.9.5) over (0.98.9.4) ... dpkg-install- 8lVGqH/ 63-linux- firmware- raspi2_ 4-0ubuntu0~ 20.04.1_ arm64.deb
Preparing to unpack .../63-
dpkg-divert: error: 'diversion of /lib/firmware/
dpkg: error processing archive /tmp/apt-
new linux-firmware-
No diversion 'diversion of /lib/firmware/
No diversion 'diversion of /lib/firmware/
No diversion 'diversion of /lib/firmware/
No diversion 'diversion of /lib/firmware/
No diversion 'diversion of /lib/firmware/
No diversion 'diversion of /lib/firmware/
No diversion 'diversion of /lib/firmware/
No diversion 'diversion of /lib/firmware/
No diversion 'diversion of /lib/firmware/
No diversion 'diversion of /lib/firmware/
No diversion 'diversion of /lib/firmware/
No diversion 'diversion of /lib/firmware/
No diversion 'diversion of /lib/firmware/
No diversion 'diversion of /lib/firmware/
dpkg-divert: error: mismatch on package
when removing 'diversion of /lib/firmware/
found 'diversion of /lib/firmware/
dpkg: error while cleaning up:
new linux-firmware-
Preparing to unpack .../64-
Unpacking linux-libc-
Preparing to unpack .../65-
Unpacking openvpn (2.4.7-
Preparing to unpack .../66-
Unpacking pi-bluetooth (0.1.15ubuntu0~
dpkg: warning: unable to delete old directory '/lib/firmware/
Preparing to unpack .../67-
Unpacking python3-pip (20.0.2-5ubuntu1.5) over (20.0.2-5ubuntu1.1) ...
Preparing to unpack .../68-
Unpacking python-pip-whl (20.0.2-5ubuntu1.5) over (20.0.2-5ubuntu1.1) ...
Preparing to unpack .../69-
Unpacking python3-
Preparing to unpack .../70-
Unpacking python3-apport (2.20.11-
Preparing to unpack .../71-
Unpacking python3-pil:arm64 (7.0.0-4ubuntu0.4) over (7.0.0-4ubuntu0.3) ...
Preparing to unpack .../72-
Unpacking software-
Preparing to unpack .../73-
Unpacking software-
Preparing to unpack .../74-
Unpacking python3-
Errors were encountered while processing:
/tmp/apt-
E: Sub-process /usr/bin/dpkg returned an error code (1)
Now my wifi is broken.