ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory

时间:2021-08-24 11:46:38

问题描述:

ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory

ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory

首先检查/usr/local/cuda/lib64目录,看看libcusolver.so.8.0是否存在,如果不存在,则先正确安装cuda。如果确定cuda已经存在,这个问题的出现于Linux的ldconfig命令有关。

解决办法:

第一种方法:

在终端执行:

export LD_LIBRARY_PATH=”$LD_LIBRARY_PATH:/usr/local/cuda/lib64”
export CUDA_HOME=/usr/local/cuda

但是每次要运行tensorflow时都得执行此命令

第二种方法:

sudo ldconfig /usr/local/cuda/lib64

第三种方法:

在bashrc中写入路径:

vim ~/.bashrc
export LD_LIBRARY_PATH=”$LD_LIBRARY_PATH:/usr/local/cuda/lib64”
export CUDA_HOME=/usr/local/cuda
source ~/.bashrc