- Newest
- Most votes
- Most comments
I think the original docs need updating and this is a better doc https://repost.aws/articles/ARwfQMxiC-QMOgWykD9mco1w/how-do-i-install-nvidia-gpu-driver-and-optionally-cuda-toolkit-in-amazon-linux-2023
Based on the information you've provided, it appears you're encountering an issue with missing kernel source files after installing the kernel-devel package on an Amazon Linux 2023 instance. This is likely because the kernel-devel package doesn't automatically install the full kernel source.
To resolve this issue, you should try the following steps:
-
Ensure you have the latest updates: sudo yum update -y
-
Install both the kernel-devel and kernel-headers packages for your specific kernel version: sudo yum install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r)
-
If the above doesn't work, you may need to install the full kernel source: sudo yum install -y kernel-src-$(uname -r)
-
After installation, verify that the kernel source files are present: ls -la /usr/src/kernels/$(uname -r)
If you still don't see the kernel source files after these steps, you may need to reboot your instance to ensure you're using the correct kernel version: sudo reboot
After rebooting, check again for the kernel source files. If the issue persists, you may want to consider using a different Amazon Linux 2023 AMI or contacting AWS support for further assistance.
Remember that the exact kernel version (6.1.131-143.221.amzn2023.x86_64) you mentioned is specific to your instance and may change with updates. Always use the $(uname -r) command to ensure you're installing packages for your current kernel version.
Sources
Amazon Linux 2023 RPM packages as of the 2023.7.20250331 release - Amazon Linux 2023
Amazon Linux 2023 version 2023.4.20240416 release notes - Amazon Linux 2023
Relevant content
- asked 3 years ago
