NVIDIA drivers not installing on Linux Mint 22

Hi everyone,

I’m trying to install NVIDIA drivers on Linux Mint 22 and followed this guide:
https://greenwebpage.com/community/how-to-quickly-install-nvidia-drivers-on-linux-mint-22/

I followed the steps in the post and tried installing the driver using the terminal, but the installation fails.

When I run the install command, I get this error:

ERROR: Unable to load the kernel module 'nvidia.ko'. 
This may be because the kernel module was built against the wrong kernel sources,
or the currently running kernel is not supported.

My system details:

  • Linux Mint 22 (Cinnamon)

  • Kernel: 6.x

  • GPU: NVIDIA GTX 1650

I also tried rebooting and reinstalling but the issue persists.

Has anyone encountered this problem on Mint 22? Any suggestions on how to fix the driver installation?

Thanks in advance.

This usually happens when the kernel headers or build-essential packages are missing. Try installing them first and then reinstall the NVIDIA driver.
Also make sure Secure Boot is disabled in BIOS because it can sometimes prevent the NVIDIA kernel module from loading.