显卡相关 nvidia 安装 卸载

卸载nvidia显卡
找到显卡卸载命令

find / -name nvidia-uninstall

执行卸载程序

 

安装nvidia显卡

在Centos安装nvidia显卡时报ERROR: The Nouveau kernel driver is currently in use by your system...

1、cd /etc/modprobe.d 查看是否有blacklist.conf文件,没有则创建

2、修改blacklist.conf, 添加blacklist nouveau options nouveau modeset=0

3、执行 dracut --force

4、reboot后,执行 lsmod | grep nouveau,应该没有输出才对

5、继续安装,nvidia-smi验证

 

在Centos安装nvidia显卡时报Unable to find the development tool `cc` in your path; please make sure that you have the package 'gcc' installed...

1、执行gcc --version查看是否存在gcc

2、若不存在则安装 yum install gcc gcc-c++ kernel-devel

3、再执行gcc --version验证

 

在Centos安装nvidia显卡时报Unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source...

原因是没有找到内核源码,需要下载内核源码 yum install kernel-devel

如果仍然报相同Error,解决办法有如下3种
1、并没有升级到最新版本内核:yum update kernel
2、刚才yum install的kernel-devel版本和当前系统的版本不匹配,通过/usr/src/kernels/查看安装的版本。通过 uname -r查看系统的版本。
例如 uname -r 输出为 3.10.0-1160.el7.x86_64,那么 yum install kernel-devel-3.10.0-1160.el7.x86_64 再安装一遍。
3、阅读报错信息,安装时,增加参数--kernel-source-path=/usr/src/kernels/3.10.0-1160.el7.x86_64

另外
rpm -qa | grep kernel 查看版本
kernel-devel 的版本一定要和内核的版本一致,否则会出现各种兼容性ERROR

再次安装验证 有必要可以选择[reboot]一次

 

在欧拉系统安装nvidia显卡时报Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later.

选择No,可以正确安装Nvidia驱动

 

posted @ 2023-05-10 11:43  szcj~  阅读(616)  评论(0)    收藏  举报