ubuntu20.04安装CUDA10.2失败!
按照网上教程安装CUDA10.1 或 CUDA10.2时候,即执行官方的命令的时候
sudo sh cuda_10.2.89_440.33.01_linux.run
执行完这条命令后,直接提示了安装错误。
查看log
[INFO]: md5 matches, removing file /var/log/nvidia/.uninstallManifests/CUDA_Toolkit_10.2-components/CUDA_Tools_10.2-components/CUDA_Visual_Tools_10.2-components/
[ERROR]: boost::filesystem::remove: Directory not empty: "/var/log/nvidia/.uninstallManifests/CUDA_Toolkit_10.2-components/CUDA_Tools_10.2-components/CUDA_Visual_Tools_10.2-components/"
[INFO]: md5 matches, removing file /usr/local/cuda-10.2/libnsight/plugins/org.eclipse.equinox.p2.core_2.3.0.v20131211-1531.jar
[INFO]: md5 matches, removing file /var/log/nvidia/.uninstallManifests/CUDA_Toolkit_10.2-components/CUDA_Tools_10.2-components/CUDA_Visual_Tools_10.2-components/
[ERROR]: boost::filesystem::remove: Directory not empty: "/var/log/nvidia/.uninstallManifests/CUDA_Toolkit_10.2-components/CUDA_Tools_10.2-components/CUDA_Visual_Tools_10.2-components/"
[INFO]: md5 matches, removing file /usr/local/cuda-10.2/libnsight/plugins/org.eclipse.core.net.linux.x86_64_1.1.100.v20140124-2013.jar
[INFO]: md5 matches, removing file /var/log/nvidia/.uninstallManifests/CUDA_Toolkit_10.2-components/CUDA_Tools_10.2-components/CUDA_Visual_Tools_10.2-components/
[ERROR]: boost::filesystem::remove: Directory not empty: "/var/log/nvidia/.uninstallManifests/CUDA_Toolkit_10.2-components/CUDA_Tools_10.2-components/CUDA_Visual_Tools_10.2-components/"
[INFO]: md5 matches, removing file /usr/local/cuda-10.2/libnsight/plugins/org.eclipse.core.contenttype_3.4.200.v20140207-1251.jar
[INFO]: md5 matches, removing file /var/log/nvidia/.uninstallManifests/CUDA_Toolkit_10.2-components/CUDA_Tools_10.2-components/CUDA_Visual_Tools_10.2-components/
[ERROR]: boost::filesystem::remove: Directory not empty: "/var/log/nvidia/.uninstallManifests/CUDA_Toolkit_10.2-components/CUDA_Tools_10.2-components/CUDA_Visual_Tools_10.2-components/"
[INFO]: md5 matches, removing file /usr/local/cuda-10.2/libnsight/plugins/org.eclipse.ant.core_3.3.0.v20140518-0042.jar
经过查阅资料,发现
在sh xx.run后面加入路径即可正常安装,命令如下
sh XX.linux.run --silent --toolkit --samples --librarypath=/usr/local/cuda
#比如是CUDA10.1 则输入
sudo sh cuda_10.2.89_440.33.01_linux.run --silent --toolkit --samples --librarypath=/usr/local/cuda-10.1
这样子就可以正常安装了。