tensorflow安装使用中的一些问题 - ricket-sjtu/bioinformatics GitHub Wiki
- 操作系统版本: Red Hat Enterprise Linux Server release 6.8 (Santiago)
- Linux内核版本: 2.6.32-642.el6.x86_64
常见问题及解决方案
glibc version too low
- 安装更高版本的glibc,例如glibc-2.17或者更高版本,但不推荐最新版本;
- 运行
configure
时,加入--prefix
选项,指定安装目录; - 修改环境变量
LD_LIBRARY_PATH
包含新的glibc的安装目录库所在位置
- 安装高版本glibc后出现的链接问题 出现这样的错误信息
error while loading shared libraries: __vdso_time: invalid mode for dlopen():Invalid argument 这时候,改用不同的方式运行
python
:
/path/to/glibc-2.17/lib/ld-linux-x86-64.so.2 --library-path /path/to/glibc-2.17/lib:$LD_LIBRARY_PATH:/path/to/gcc-5.2.0/lib64:/usr/lib64/ `which python`
-
numpy
版本的问题 用pip
安装更高版本的的numpy
-
protobuf3 not found
的问题 运行import tensorflow
报告错误
TypeError: init() got an unexpected keyword argument 'syntax' 解决方案是
pip install 'protobuf>=3.0.0a3'
- 调用cuInit错误:
CUDA_ERROR_NO_DEVICE
设置环境变量,显式指定使用的GPU:
export CUDA_VISIBLE_DEVICES=0
libcuda.so.1 not found
设置环境变量LD_LIBRARY_PATH
,显示指定路径:
export LD_LIBRARY_PATH=/WHERE/HOSTS/libcuda.so
-
ELFCLASS32 error
链接使用了32位的,应该位64位的.so
文件。 -
glibc 2.15 cannot create regular file
/var/db/Makefile': Permission denied` 安装改用glibc 2.17或者更高版本。