Although I had to use dpkg -i rather than apt-get to install the installer package, I'm getting similar errors.
Failure for me seems to start at configuring the amdgpu-dkms module for my 5.18 kernel ; 5.10 kernel module builds seemed okay though.
The installer starts to fail at the dkms mentioned step for the 5.18 kernel. The output is:
Building initial module for 5.18.0-4mx-amd64
Error! Bad return status for module build on kernel: 5.18.0-4mx-amd64 (amd64)
Consult /var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build/make.log for more information.
This is a lengthier fail-log that has a few warnings followed by an error that terminates the build:
In file included from /var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build/include/kcl/backport/kcl_drm_dp_helper_backport.h:5,
from /var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build/amd/backport/backport.h:67,
from <command-line>:
/var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build/include/kcl/kcl_drm_dp_helper.h: At top level:
/var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build/include/kcl/kcl_drm_dp_helper.h:33:10: fatal error: drm/drm_dp_helper.h: No such file or directory
33 | #include <drm/drm_dp_helper.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [/usr/src/linux-headers-5.18.0-4mx-common/scripts/Makefile.build:294: /var/lib/dkms/amdgpu/5.16.9.22.20-1438746~20.04/build/amd/amdgpu/amdgpu_drv.o] Error 1