在 CentOS 7 上安装 CUDA 7.5 - 无法定位内核源
Installing CUDA 7.5 on CentOS 7 - Unable to locate the kernel source
首先,所有这些都是以 root 身份完成的。我一直在尝试在 CentOS 7 SATA DOM 上安装 CUDA 7.5 驱动程序。我 运行 遇到的问题如下:
Installing the NVIDIA display driver...
The driver installation is unable to locate the kernel source. Please make sure that the kernel source packages are installed and set up correctly.
If you know that the kernel source packages are installed and set up correctly, you may pass the location of the kernel source with the '--kernel-source-path' flag.
我尝试使用以下命令指向内核源路径(我可能指向错误的路径;我是新 Linux 用户):
$ ./cuda_7.5.18_linux.run --kernel-source-path=/usr/src/kernels/3.10.0-327.18.2.el7.x86_64
和以前一样的问题。我在网上看到其他人遇到这个问题是因为内核版本不匹配。然而,事实并非如此:
$ uname -r
3.10.0-327.18.2.el7.x86_64
$ rpm -q kernel-devel kernel-headers
kernel-devel-3.10.0-327.18.2.el7.x86_64
kernel-headers-3.10.0-327.18.2.el7.x86_64
$ ls /usr/src/kernels
3.10.0-327.18.2.el7.x86_64
$ ls /usr/src/kernels/3.10.0-327.18.2.el7.x86_64/
arch block crypto drivers firmware fs include init ipc Kconfig kernel lib Makefile mm Module.symvers net samples scripts security sound System.map tools usr virt vmlinux.id
我也试过安装不同版本的gcc,还是不行。
如有任何帮助,我们将不胜感激。
谢谢。
我明白了。原来我需要从 EPEL 存储库安装 DKMS。以下是我使用的命令:
sudo yum install epel-release
yum install --enablerepo=epel dkms
首先,所有这些都是以 root 身份完成的。我一直在尝试在 CentOS 7 SATA DOM 上安装 CUDA 7.5 驱动程序。我 运行 遇到的问题如下:
Installing the NVIDIA display driver...
The driver installation is unable to locate the kernel source. Please make sure that the kernel source packages are installed and set up correctly.
If you know that the kernel source packages are installed and set up correctly, you may pass the location of the kernel source with the '--kernel-source-path' flag.
我尝试使用以下命令指向内核源路径(我可能指向错误的路径;我是新 Linux 用户):
$ ./cuda_7.5.18_linux.run --kernel-source-path=/usr/src/kernels/3.10.0-327.18.2.el7.x86_64
和以前一样的问题。我在网上看到其他人遇到这个问题是因为内核版本不匹配。然而,事实并非如此:
$ uname -r
3.10.0-327.18.2.el7.x86_64
$ rpm -q kernel-devel kernel-headers
kernel-devel-3.10.0-327.18.2.el7.x86_64
kernel-headers-3.10.0-327.18.2.el7.x86_64
$ ls /usr/src/kernels
3.10.0-327.18.2.el7.x86_64
$ ls /usr/src/kernels/3.10.0-327.18.2.el7.x86_64/
arch block crypto drivers firmware fs include init ipc Kconfig kernel lib Makefile mm Module.symvers net samples scripts security sound System.map tools usr virt vmlinux.id
我也试过安装不同版本的gcc,还是不行。
如有任何帮助,我们将不胜感激。
谢谢。
我明白了。原来我需要从 EPEL 存储库安装 DKMS。以下是我使用的命令:
sudo yum install epel-release
yum install --enablerepo=epel dkms