已经安装好对应版本的cuda和cudnn之后使用tensorflow依旧报错,错误如下:
2020-12-03 15:00:04.386786: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudart.so.10'; dlerror: libcudart.so.10: cannot open shared object file: No such file or directory
2020-12-03 15:00:04.386838: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcublas.so.10'; dlerror: libcublas.so.10: cannot open shared object file: No such file or directory
2020-12-03 15:00:04.386883: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcufft.so.10'; dlerror: libcufft.so.10: cannot open shared object file: No such file or directory
2020-12-03 15:00:04.386926: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcurand.so.10'; dlerror: libcurand.so.10: cannot open shared object file: No such file or directory
2020-12-03 15:00:04.386970: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusolver.so.10'; dlerror: libcusolver.so.10: cannot open shared object file: No such file or directory
2020-12-03 15:00:04.387012: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusparse.so.10'; dlerror: libcusparse.so.10: cannot open shared object file: No such file or directory
解决办法:connot open 哪个就运行如下哪个
sudo cp /usr/local/cuda-10.0/lib64/libcudart.so.10 /usr/local/lib/libcudart.so.10 && sudo ldconfig
sudo cp /usr/local/cuda-10.0/lib64/libcublas.so.10 /usr/local/lib/libcublas.so.10 && sudo ldconfig
sudo cp /usr/local/cuda-10.0/lib64/libcufft.so.10 /usr/local/lib/libcufft.so.10 && sudo ldconfig
sudo cp /usr/local/cuda-10.0/lib64/libcusolver.so.10 /usr/local/lib/libcusolver.so.10 && sudo ldconfig
sudo cp /usr/local/cuda-10.0/lib64/libcusparse.so.10 /usr/local/lib/libcusparse.so.10 && sudo ldconfig
注:以上操作已经安装对应版本的cuda和cudnn的前提,出现如下错误。