安装所需要的驱动 从NVIDIA官网上下载所需要的驱动文件(.run)。 https://www.nvidia.cn/Download/index.aspx?lang=cn
具体的选择是:Quadro Series -> K4000 -> Linux 64bit -> English(US)。
安装依赖关系 三个依赖:gcc,kernel-devel,dkms。要注意kernel-devel要与当前内核版本一致,检查方式如下:
1 2 uname -r rpm -aq | grep kernel-devel
我的检查结果是源码有多个版本共存,但后面安装过程正常,应该没什么问题。
屏蔽系统的nouveau 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 $ sudo vi /lib/modprobe.d/dist-blacklist.conf blacklist nouveau options nouveau modeset=0 $ sudo mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak $ sudo dracut /boot/initramfs-$(uname -r).img $(uname -r) $ reboot
安装驱动 先修改.run文件的权限为可执行
$ chmod +x NVIDIA-Linux-x86_64-xxxxxx.run
然后执行!
$ sudo ./NVIDIA-Linux-x86_64-xxxxxx.run
在这过程中遇到的选择: 1: “XXXXXX” 大体意思是现在没有完全退出X Windows
A:退出驱动安装,确认系统完全退出图形界面。比如:
$ init 5 # 进入图形界面
$ systemctl set-default multi-user.target # 准备进入文本模式
$ reboot # 重启后自动进入文本模式,之后再重新run
2:Install NVIDIA‘s 32-bit compatibility libraries?
A:选择NO继续。
3:Would you like to run the nvidia-xconfigutility to automatically update your x configuration so that the NVIDIA x driver will be used when you restart x? Any pre-existing x confile will be backed up.
A:选择YES继续。
安装完成!