Akmods missing files

Im trying to use akmods to troubleshoot an nvidia driver issue but it outputs:

sudo akmods
Checking kmods exist for 6.14.0-63.fc42.x86_64             [  OK  ]
Files needed for building modules against kernel
6.14.0-63.fc42.x86_64 could not be found as the following
directories are missing:
/usr/src/kernels/6.14.0-63.fc42.x86_64/
/lib/modules/6.14.0-63.fc42.x86_64/build/Is the correct kernel-devel package installed? [FAILED]

In “/usr/src/kernels” i have a “6.14.6-300.fc42.x86_64” folder there instead

“/lib/modules/6.14.0-63.fc42.x86_64/build/” says the link is broken and is supposed to link to the missing “6.14.0-63.fc42.x86_64” folder in “/usr/src/kernels”

Pretty sure i fixed this with:

sudo dnf install -y kernel-devel-6.14.0-63.fc42

after further troubleshooting and was able to use akmods to fix the nvidia kernel module missing, falling back to nouveau issue

f42 is now using the 6.14.6-300 kernel and it appears you have that kernel installed, so you probably could have ignored the message about the 6.14.0-63 kernel. (I am guessing you are not booting with that older kernel anyway).