【Deepin 20系统+Tensorflow 2】Linux系统解决Could not load dynamic library ‘libcudart.so.10.0‘
2023-09-14 09:12:58 时间
问题
环境
Deepin 20系统: Debian OS
NVIDIIA 驱动: NVIDIA-SMI 455.45.01 Driver Version: 455.45.01
nvidia-smi 显示cuda版本: CUDA Version: 11.1
安装的Cuda版本:11.1
Tensorflow2.0
在使用tensorflow2跑程序时,GPU没有利用起来,通过代码查看GPU使用情况,输出日志如下
import tensorflow as tf
print(tf.test.is_gpu_available())
输出日志
2021-03-08 19:51:11.747354: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2021-03-08 19:51:11.774909: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2899885000 Hz
2021-03-08 19:51:11.775871: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55d501378430 executing computations on platform Host. Devices:
2021-03-08 19:51:11.775926: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): Host, Default Version
2021-03-08 19:51:11.779414: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2021-03-08 19:51:11.881523: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-08 19:51:11.882130: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55d50140f0f0 executing computations on platform CUDA. Devices:
2021-03-08 19:51:11.882152: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): GeForce RTX 2070, Compute Capability 7.5
2021-03-08 19:51:11.882334: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-08 19:51:11.882678: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: GeForce RTX 2070 major: 7 minor: 5 memoryClockRate(GHz): 1.62
pciBusID: 0000:01:00.0
2021-03-08 19:51:11.882903: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudart.so.10.0'; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64:/home/mgege007/cuda-11/lib64::/usr/local/cuda/extras/CUPTI/lib64
2021-03-08 19:51:11.882991: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcublas.so.10.0'; dlerror: libcublas.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64:/home/mgege007/cuda-11/lib64::/usr/local/cuda/extras/CUPTI/lib64
2021-03-08 19:51:11.883060: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcufft.so.10.0'; dlerror: libcufft.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64:/home/mgege007/cuda-11/lib64::/usr/local/cuda/extras/CUPTI/lib64
2021-03-08 19:51:11.883131: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcurand.so.10.0'; dlerror: libcurand.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64:/home/mgege007/cuda-11/lib64::/usr/local/cuda/extras/CUPTI/lib64
2021-03-08 19:51:11.883202: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusolver.so.10.0'; dlerror: libcusolver.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64:/home/mgege007/cuda-11/lib64::/usr/local/cuda/extras/CUPTI/lib64
2021-03-08 19:51:11.883269: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusparse.so.10.0'; dlerror: libcusparse.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64:/home/mgege007/cuda-11/lib64::/usr/local/cuda/extras/CUPTI/lib64
2021-03-08 19:51:11.883334: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64:/home/mgege007/cuda-11/lib64::/usr/local/cuda/extras/CUPTI/lib64
2021-03-08 19:51:11.883344: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1641] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2021-03-08 19:51:11.883362: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-03-08 19:51:11.883370: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0
2021-03-08 19:51:11.883376: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N
False
问题解决
日志说明:正在寻找CUDA 10.0。 但是我的CUDA版本是11.1,不能使用CUDA 11.1或CUDA 11.2替代它。 仅仅需要去官网下载CUDA10.0和对应的cudnn安装即可,不需要更改NVIDIA驱动。并且注意,根据自己的文件CUDA路径,进行相应的环境变量的配置
步骤
(1)CUDA+CuDnn安装过程参考本人另一篇博客Deepin 20系统安装CUDA+cudnn
(2)更改CUDA环境变量参考本人另一篇博客Deepin 20系统切换CUDA版本
相关文章
- linux文件经 windows系统 之后出现 权限缺失 的解决方法
- AspNet Core 发布到Linux系统和发布IIS 注意项
- Linux学习之CentOS(一)----在VMware虚拟机中安装CentOS 7
- 【硬件】Linux查看系统信息
- Linux高级运维 第三章 Linux基本命令操作
- linux deepin tar安装jdk8
- paip.注册java程序为LINUX系统服务的总结。
- 【Linux 内核】调度器 ① ( 调度器概念 | 调度器目的 | 调度器主要工作 | 调度器位置 | 进程优先级 | 抢占式调度器 | Linux 进程状态 | Linux 内核进程状态 )
- 【Linux 内核】进程管理 task_struct 结构体 ⑤ ( files 字段 | nsproxy 字段 | 信号处理相关字段 | 信号量和共享内存相关字段 )
- Linux Kernel系列 - 黄牛X内核代码凝视
- L72.linux命令每日一练 -- 第十章 Linux网络管理命令 -- mail和nslookup
- 解决VNC中Linux系统与Win系统中复制粘贴问题!(亲测有效!)
- Linux系统休眠、待机自动化测试脚本
- Linux系统shell脚本之根分区监控
- Linux系统之部署Rsyslog 日志服务器
- 2023年中职网络安全—Linux系统渗透提权2204解析(详细)
- conda安装r Linux系统中 linux中安装r
- 使用wget批量下载geo数据集的全部文件 linux下载geo数据 geo处理的数据不是下载原始数据 Linux如何下载ftp文件 geo ftp geo ftp下载 geo下载
- linux top命令及结果详解 top -p 查看Linux程序运行进程
- 02 从头开始atac项目 ubuntu20 install r4.2 Linux系统环境配置 服务器版本的rstudio r install in linux /ubuntu/centos
- Linux下安装Oracle的过程和涉及的知识点-系列6
- Linux中运行c程序,与系统打交道
- 74:应急响应-win&linux分析后门&勒索病毒&攻击 ==》暴力破解攻击成功的在4624的eventID里!PChunter可查看非系统的可疑启动项/服务/定时任务,还是很直观的!Linux下gscan也不错,EDR可参考。
- sar 找出系统瓶颈的利器 目前Linux上最为全面的系统性能分析工具之一 直接 sar -dur 1 30 即可看内存 CPU和IO占用
- Django项目在linux系统中虚拟环境部署
- 【Deepin 系统】Linux系统解决安装wxPython安装不上的问题
- Linux 系统中的僵尸进程
- 解决安装AI算法库TensorFlow 2.0的最新入坑指南以及详细的安装教程【分别在linux和windows系统下安装】
- 完美解决VMware虚拟机 Linux系统 Ubuntu 20.04 硬盘/磁盘扩容的问题(超级超级详细)
- Linux系统休眠、待机自动化测试脚本
- 嵌入式linux开发,启用用户登录功能
- docker cobbler批量部署Linux/windows系统(三)——筑梦之路