链接在此: Ubuntu20.04+GeForce RTX 2080 SUPER+cuda11.1+cudnn8.0.4+openCV4.4.0环境搭建
出现的问题1: ubuntu20.04 安装libpng12-dev libpng12-0
出现的问题2:安装nvidia驱动后无法进入桌面/黑屏, 重启 ctrl+alt+f2进入命令行系统,备份后删除/etc/X11/xorg.conf文件 reboot即可。原因如下
在安装驱动过程中如果以下问题选择了:是
Would you like to run the nvidia-xconfig utility to automatically update your X
configuration file so that the NVIDIA X driver will be used when you restart X?
Any pre-existing X configuration file will be backed up.
Yes No
出现的问题3.Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
解决办法:
apt-get install python3-dev
问题4:更新Ubuntu内核后,无法加载NVIDIA驱动的问题
xxx@ubuntu: ~$ nvidia-smi
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
- 1
- 2
进入/usr/src可以看到nvidia-435.xxx文件夹,说明nvidia驱动版本是435.xxx。根据网上的办法,使用以下命令:
sudo apt-get install dkms
sudo dkms install -m nvidia -v xxx(NVIDIA版本号)