Error while using a newer version of glibc

前端 未结 2 1288
天涯浪人
天涯浪人 2020-12-01 15:19

I am trying to install tensorflow on a linux server where I am just a user without the root permission. And I cannot transfer files to/from it as I ssh to it through a jump

相关标签:
2条回答
  • 2020-12-01 15:36

    In my case it was centos 6 with python for pytorch.

    I had errors like, etc.:

    libraries: __vdso_time: invalid mode for dlopen(): Invalid argument
    
    ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/evaldsu/.conda/envs/conda_env/lib/python3.6/site-
    

    I installed alongside glibc-2.17 in local dir /opt/exp_soft/tools

    then I installed in conda env patching tool (can install using other tools as well):

    conda install -c conda-forge patchelf
    

    then I patched binary of python to use different glibc path (you can do this with any binary). Be aware that it will change you python binary.

    patchelf --set-rpath /opt/exp_soft/tools/glibc-2.17/lib:$HOME/.conda/envs/conda_inf/lib:/usr/lib64:/lib64:/lib --set-interpreter /opt/exp_soft/tools/glibc-2.17/lib/ld-linux-x86-64.so.2 /home/evaldsu/.conda/envs/conda_inf/bin/python3.6
    

    Another option is just install this script if you have full admin access:

    https://gist.github.com/harv/f86690fcad94f655906ee9e37c85b174

    0 讨论(0)
  • 2020-12-01 15:41

    export LD_LIBRARY_PATH=/home/MYNAME/dependency/glibc-2.16/lib

    This answer explains why LD_LIBRARY_PATH doesn't work, and what you should do instead.

    I read your post and tried ...
    python: error while loading shared libraries: __vdso_time: invalid mode for dlopen(): Invalid argument

    The error usually means that you have a mismatch between ld-linux and libc.so.6. They must match.

    If you are using direct loader invocation via /home/MYNAME/.../ld-2.16.so, you must also arrange for /home/MYNAME/.../libc.so.6 to be loaded.

    You can do that by passing --library-path ... to ld-2.16.so, or setting LD_LIBRARY_PATH appropriately.

    Your command with ld-2.16 --library-path ... ls is almost correct. The thing you are missing is that ld-2.16 will not search your PATH. You need to give it full pathname: ld-2.16 --library-path ... /bin/ls.

    0 讨论(0)
提交回复
热议问题