cuda安装Installation failed log: [ERROR]: Unable to determine libdir

cuda安装Installation failed log: [ERROR]: Unable to determine libdir

目录

本机环境

  • ubuntu20.04(GTX 2080ti)
  • cuda10.02
  • 使用的cuda安装包cuda_10.2.89_440.33.01_linux.run

问题产生的过程

前面就不论述了,下载,安装。这里不安装cuda安装包中自带的显卡驱动。
在这里插入图片描述这里报了错。

Installation failed. See log at /var/log/cuda-installer.log for details.

在这里插入图片描述具如何查看log中ERROR的内容呢?

$ cat /var/log/cuda-installer.log | grep [ERROR] > a.txt

a.txt文件中的具体错误内容如下:

[ERROR]: Unable to determine libdir
[ERROR]: Unable to determine libdir
...
[ERROR]: boost::filesystem::remove: Directory not empty: "/var/log/nvidia/.uninstallManifests/"
[ERROR]: boost::filesystem::remove: Directory not empty: "/var/log/nvidia/.uninstallManifests/"
[ERROR]: boost::filesystem::remove: Directory not empty: "/var/log/nvidia/.uninstallManifests/"
[ERROR]: boost::filesystem::remove: Directory not empty: "/var/log/nvidia/.uninstallManifests/"
[ERROR]: boost::filesystem::remove: Directory not empty: "/var/log/nvidia/.uninstallManifests/"
[ERROR]: boost::filesystem::remove: Directory not empty: "/var/log/nvidia/.uninstallManifests/"
[ERROR]: boost::filesystem::remove: Directory not empty: "/var/log/nvidia/.uninstallManifests/"
[ERROR]: boost::filesystem::remove: Directory not empty: "/var/log/nvidia/.uninstallManifests/"
[ERROR]: boost::filesystem::remove: Directory not empty: "/var/log/nvidia/.uninstallManifests/CUDA_Toolkit_10.2-components/CUDA_Tools_10.2-components/CUDA_Command_Line_Tools_10.2-components/"

解决方案

参考了这个回答求助!!ubuntu20.04安装CUDA10.2失败!(事实证明搜索也是有技巧的。搜[ERROR]: boost::filesystem::remove: Directory not empty: "/var/log/nvidia/.uninstallManifests/"这个就有相关结果了。)
将指令改为sudo ./cuda_10.2.89_440.33.01_linux.run --librarypath=/usr/local/cuda-10.2,重新运行。操作和上面的相同。

xuyc@xuyc-Super-Server:~/Desktop$ sudo ./cuda_10.2.89_440.33.01_linux.run  --librarypath=/usr/local/cuda-10.2
===========
= Summary =
===========

Driver:   Not Selected
Toolkit:  Installed in /usr/local/cuda-10.2/
Samples:  Installed in /home/xuyc/, but missing recommended libraries

Please make sure that
 -   PATH includes /usr/local/cuda-10.2/bin
 -   LD_LIBRARY_PATH includes /usr/local/cuda-10.2/lib64, or, add /usr/local/cuda-10.2/lib64 to /etc/ld.so.conf and run ldconfig as root

To uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-10.2/bin

Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-10.2/doc/pdf for detailed information on setting up CUDA.
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 440.00 is required for CUDA 10.2 functionality to work.
To install the driver using this installer, run the following command, replacing <CudaInstaller> with the name of this run file:
    sudo <CudaInstaller>.run --silent --driver

Logfile is /var/log/cuda-installer.log

测试cuda是否安装成功

接下来配置环境变量。
输入gedit ~/.bashrc命令打开文件,在文件结尾输入以下语句,保存。

export PATH=/usr/local/cuda-10.2/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

更新环境变量配置

source ~/.bashrc

然后使用nvcc -V测试以下是否能检测到Cuda,出现以下的信息就是成功啦。
在这里插入图片描述

  • 11
    点赞
  • 37
    收藏
    觉得还不错? 一键收藏
  • 10
    评论
评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值