Centos7---Centos7 uninstall nvidia driver and CUDA toolkit

The nvidia driver needs to be reinstalled, so the previous version needs to be uninstalled.

view version

lspci | grep -i nvidia

insert image description hereDue to driver problems, the specific model of the graphics card cannot be displayed. Enter 2504 in the URL below, and you can see that the graphics card model is

GeForce GTX 1080 Ti

PCI devices

insert image description here

method :

1. View installed nvidia module commands

rpm -qa|grep -i nvid|sort

insert image description here

2. Delete related modules

yum  remove kmod-nvidia-*

insert image description here

3. Completely uninstall the nvidia driver

yum remove "*nvidia*"

insert image description here

4. Completely uninstall CUDA TOOLKIT

yum remove "*cublas*" "cuda*"

insert image description here

5. Be sure to restart after uninstalling the driver

sudo reboot

Important:
Uninstall the previously loaded driver (temporarily valid, once the computer is restarted, there will still be Driver/library version mismatch problems

insert image description here

sudo lsof /dev/nvidia*
sudo kill -9 7707
若有多个使用nvidia的进程,则kill后面加上相关的PID号

insert image description here

The process of installing cuda and cudnn is the same as my other blog

Install cuda and cudnn

Reference:
Linux, centos7 successfully installed the graphics card driver

Reference:
The version correspondence between cuda and cudnn can refer to:
The version correspondence between cuda and cudnn

Guess you like

Origin blog.csdn.net/m0_46825740/article/details/125448274