Unable to install NVIDIA drivers after upgrading to from fedora 40 t0 42

Today I saw that fedora 40 was EOL and I decided to upgrade to fedora 42.
After the upgrade and some cleanup I rebooted and used CTRL+ALT+F2 to go to tty and reinstall the NVIDIA driver. But I keep getting a error that it failed to build.

I checked the install log file and it is filled with what looks to be compile errors.
In the past I have never had much problems with upgrading as I would just upgrade, reinstall the driver, and done. But to day it does not want to work.

I have had some problem in the past after a kernel upgrade where the current version could not be reinstalled so I just downloaded the latest version and that worked. However, I have tried 3 versions and they keep failing to build. I have a GTX 1650 super and the kernel version is 6.14.6-300.fc42. I also have the kernel-devel and kernel-headers, but the version for kernel-headers is 3.14.3-300.fc42. This is the latest one.

I’m not sure if the problem could be related to me missing or needing to upgrade some other package or not. Would anyone happen to know what is wrong?
If I recall, I think I one had a similar issue that was because I was missing a required package, but I don’t remember.

Also, If anyone wants to know why I don’ use the RPM fusion driver. It is because last year I decided to do a clean install of fedora and try to install the driver using RPM fusion, but when I did it just messed up my whole graphical environment and I had to reinstall fedora again. I have never had any real problems with the .run file from NVIDIA except now.

Thanks for any help!

The nvidia driver doesn’t support gcc-15, either patch the .run or use the rpmfusion driver.

I use this for the f42 driver

How wold I install the rpmfusion one? I just looked at the howto page and i saw where it says to recover from the binary driver. Do I need to do that? I already used the installer to uninstall the driver. What would I need to do to make sure the rmpfusion driver will install properly?

Yes, I would also run the .run uninstall process first before running the clean up.

Wow it worked thanks!