参考链接: https://forums.developer.nvidia.com/t/errors-were-encountered-while-processing-dkms/236521/14
- 推荐cuda驱动版本的确认
sudo apt install ubuntu-drivers-common
sudo ubuntu-drivers devices
- 找 “recommended” 对应的驱动版本
- 我这里是 nvidia-driver-550
- 清理原始数据并且安装驱动
# 1. 清理cuda驱动
sudo apt-get purge 'nvidia-*'
sudo apt-get autoremove
sudo apt-get autoclean# 2. 清理残留的配置信息
sudo dpkg --purge $(dpkg -l | grep nvidia | awk '{print $2}')# 3. 重新安装
sudo apt-get install build-essential dkms
sudo apt-get install linux-headers-$(uname -r)sudo apt-get install nvidia-driver-550sudo update-initramfs -u
sudo reboot