I’m trying to install the Mellanox OFED on a CentOS 7.9 that I have on a Singularity container with the following command:
./mlnxofedinstall --add-kernel-support --force --skip-repo
However, I get the following error:
/lib/modules/4.17.0-rc2/build/scripts is required to build mlnx-ofa_kernel RPM.
Please install the corresponding kernel-source or kernel-devel RPM.
Error: One or more required packages for installing OFED-internal are missing.
Please install the missing packages using your Linux distribution Package Management tool.
Run:
yum install kernel-devel-4.17.0-rc2
Failed to build MLNX_OFED_LINUX for 4.17.0-rc2
When I try yum install kernel-dev-4.17.0-rc2, I get the following error:
No package kernel-devel-4.17.0-rc2 available.
Error: Nothing to do
And when I try yum install kernel-dev, an older version 3.something is installed that does not fix the issue.
This is output of uname -s -r:
Linux 4.17.0-rc2
And this is the output of ls -l /usr/src/kernels/:
3.10.0-1160.53.1.el7.x86_64
3.10.0-1160.53.1.el7.x86_64.debug
4.17.0-0.rc2.git3.1.fc29.x86_64
Could you please let me know how I can fix this?