当前位置:   article > 正文

Nvidia Driver的dpkg配置失败导致安装不成功_needrestart is being skipped since dpkg has failed

needrestart is being skipped since dpkg has failed

在用英伟达官网的.run 文件尝试安装driver时报错:

ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-dkms-535.0.crash'
Error! Bad return status for module build on kernel: 5.15.0-89-generic (x86_64)
Consult /var/lib/dkms/nvidia/535.129.03/build/make.log for more information.
dpkg: error processing package nvidia-dkms-535 (--configure):
 installed nvidia-dkms-535 package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 nvidia-dkms-535
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

尝试的解决办法:

1.在addional driver里查看了当前正在用的driver,显示:

可以看出没有在用的driver。

2.尝试使用sudo安装driver

sudo apt install nvidia-driver-535

以及:

sudo ubuntu-drivers autoinstall

第一种办法得到相同的错误,第二种办法提示所有driver都已经被安装。

3. 尝试在dpkg重新配置所有包

sudo dpkg --configure -a

仍然得到相同错误。

4.移除安装包后重新安装安装包

sudo apt-get purge nvidia-driver-535
sudo apt-get install nvidia-driver-525

之后再nvidia-smi就可以正常显示driver信息了。

不知道为什么这样行得通,但是还是记录下来给有需要的uu试一试。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/397915
推荐阅读
相关标签
  

闽ICP备14008679号