linux – Install Raspberry Pi Imager problem with bbswitch-dkms on Pop!_OS

Following to install Raspberry Pi Imager has these errors: seems related to bbswitch-dkms compiling issues:

$ sudo apt install rpi-imager
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
rpi-imager is already the newest version (1.7.2+noembed-0ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up bbswitch-dkms (0.8-10ubuntu2) ...
Removing old bbswitch-0.8 DKMS files...
Deleting module bbswitch-0.8 completely from the DKMS tree.
Loading new bbswitch-0.8 DKMS files...
Building for 5.19.0-76051900-generic
Building initial module for 5.19.0-76051900-generic
ERROR (dkms apport): kernel package linux-headers-5.19.0-76051900-generic is not
Error! Bad return status for module build on kernel: 5.19.0-76051900-generic (x8
Consult /var/lib/dkms/bbswitch/0.8/build/make.log for more information.
dpkg: error processing package bbswitch-dkms (--configure):
 installed bbswitch-dkms package post-installation script subprocess returned er
ror exit status 10
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

For the make logs:

/var/lib/dkms/bbswitch/0.8/build/bbswitch.c: In function ‘bbswitch_off’:
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c:272:13: error: implicit declaration of function ‘acpi_bus_get_device’; did you mean ‘acpi_is_pnp_device’? [-Werror=implicit-function-declaration]
  272 |         r = acpi_bus_get_device(dis_handle, &ad);
      |             ^~~~~~~~~~~~~~~~~~~
      |             acpi_is_pnp_device
cc1: some warnings being treated as errors
make[2]: *** [scripts/ /var/lib/dkms/bbswitch/0.8/build/bbswitch.o] Error 1
make[1]: *** [Makefile:1849: /var/lib/dkms/bbswitch/0.8/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.19.0-76051900-generic'
make: *** [Makefile:13: default] Error 2

Read more here: Source link