I got the following problem on 18.04:
- GCC was updated from GCC 7.3 to GCC 7.4
- A new kernel was installed (compiled with 7.3)
Now the NVIDIA driver will not install as it requires that the installed version was also used to compile the kernel.
I tried the IGNORE_CC_MISMATCH without success. What is the preferred way of solving the problem:
- Recompile the kernel package with the current gcc
- Downgrade GCC to 7.3
I guess one should file a bug to canonical (title: Always deploy kernels compiled with current version of GCC).