解决centos7安装cuda10.2报错 Install of driver component failed.

在Linux系统中安装NVIDIA驱动时遇到与Nouveau驱动冲突的问题,导致安装失败。冲突原因是Nouveau内核驱动与NVIDIA驱动不兼容。解决方法包括禁用Nouveau驱动,如在Fedora、RHEL/CentOS等系统中创建黑名单配置文件并更新initramfs。在完成这些步骤后,可以尝试重新安装NVIDIA驱动。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

解决系统Nouveau kernel driver与nvidia-driver冲突

  • 报错信息

Cmd:
sudo sh cuda_10.1.243_418.87.00_linux.run
Log:
/var/log/cuda-installer.log

1 [INFO]: Driver not installed.
2 [INFO]: Checking compiler version…
3 [INFO]: gcc location: /bin/gcc
5 [INFO]: gcc version: gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
7 [INFO]: Initializing menu
8 [INFO]: Setup complete
9 [INFO]: Components to install:
10 [INFO]: Driver
11 [INFO]: 418.87.00
12 [INFO]: Executing NVIDIA-Linux-x86_64-418.87.00.run --ui=none --no-questions --accept-license --disable-nouveau --no-cc-version-check --install-libglvnd 2>&1
13 [INFO]: Finished with code: 256
14 [ERROR]: Install of driver component failed.
15 [ERROR]: Install of 418.87.00 failed, quitting

~ > lspci | grep nvidia -i
01:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1080] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)

~ > uname -msr
Linux 3.10.0-957.el7.x86_64 x86_64

7.3. Disabling Nouveau
To install the Display Driver, the Nouveau drivers must first be disabled. Each distribution of Linux has a different method for disabling Nouveau.

The Nouveau drivers are loaded if the following command prints anything:

$ lsmod | grep nouveau
  1. Fedora
    Create a file at /usr/lib/modprobe.d/blacklist-nouveau.conf with the following contents:

blacklist nouveau
options nouveau modeset=0

Regenerate the kernel initramfs:
$ sudo dracut --force
Run the below command:
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Reboot the system.
7.3.2. RHEL/CentOS
Create a file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents:
blacklist nouveau
options nouveau modeset=0
Regenerate the kernel initramfs:
$ sudo dracut --force
7.3.3. OpenSUSE
Create a file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents:
blacklist nouveau
options nouveau modeset=0
Regenerate the kernel initrd:
$ sudo /sbin/mkinitrd
7.3.4. SLES
No actions to disable Nouveau are required as Nouveau is not installed on SLES.

7.3.5. WSL
No actions to disable Nouveau are required as Nouveau is not installed on WSL.

7.3.6. Ubuntu
Create a file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents:
blacklist nouveau
options nouveau modeset=0
Regenerate the kernel initramfs:
$ sudo update-initramfs -u
7.3.7. Debian
Create a file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents:
blacklist nouveau
options nouveau modeset=0
Regenerate the kernel initramfs:
$ sudo update-initramfs -u

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值