tensorflow-gpu脱机安装及glibc升级(2.23)

1、tensorflow-gpu安装过程

  • 安装Anaconda (Python 3.7)
  • 安装tensorflow-gpu(1.14.0)

下载:根据Python版本下载tensorflow_gpu-1.14.0-cp37-cp37m-win_amd64.whl,Pypi网址:https://pypi.org/project/tensorflow-gpu/#files

安装:

pip install tensorflow_gpu-1.14.0-cp37-cp37m-win_amd64.whl

报错:

ImportError: /lib64/libc.so.6: version `GLIBC_2.23' not found (required by /usr/local/python3.7/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow.so)

2、glibc升级过程

  • 下载glibc-2.23.tar.gz,网址:https://ftp.gnu.org/gnu/glibc/glibc-2.23.tar.gz
  • 编译过程:

[root@100-020-gpuserver yzadmin]#tar -zxvf glibc-2.23.tar.gz


[root@100-020-gpuserver yzadmin]#cd glibc-2.23

[root@100-020-gpuserver glibc-2.23]#mkdir build

[root@100-020-gpuserver build]#cd build

[root@100-020-gpuserver build]#../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

[root@100-020-gpuserver build]#make -j8

[root@100-020-gpuserver build]#make install
  • 报错
error while loading shared libraries: /lib64/libm.so.6: invalid ELF header
  • 建立软连接
[root@100-020-gpuserver build]#cd /lib64

[root@100-020-gpuserver lib64]#rm -rf libm.so.6

[root@100-020-gpuserver lib64]#ln -s libm-2.23.so libm.so.6
  • 检验软连接建立成功与否
  • [root@100-020-gpuserver lib64]#ll libc.so.6
    lrwxrwxrwx. 1 root root 12 Sep 11 16:32 libc.so.6 -> libc-2.23.so
    

     

你可能感兴趣的:(基础环境配置)