title: Error while using a newer version of glibc
body: <p>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 server. The system is as following :</p>
  
  <p><code>Linux THENAME_OF_SURVER 2.6.32-573.18.1.el6.x86_64 #1 SMP Tue Feb 9 22:46:17 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
  </code></p>
  
  <p>I installed the tensorflow through <code>pip install tensorflow</code> and a tensorflow program would display the following:</p>
  
  <p><code>ImportError: /lib64/libc.so.6: version `GLIBC_2.16' not found
  </code></p>
  
  <p>I installed a new version of glibc </p>
  
  <p><code>git clone git://sourceware.org/git/glibc.git
  cd glibc
  git checkout --track -b local_glibc-2.16 origin/release/2.16/master
  mkdir build
  cd build
  ../configure --prefix=/home/MYNAME/dependency/glibc-2.16
  make -j4
  make install
  </code></p>
  
  <p>Followed the instructions online, I changed the environment variables through:</p>
  
  <p><code>export LD_LIBRARY_PATH=/home/MYNAME/dependency/glibc-2.16/lib</code></p>
  
  <p>BUT this leads me to a problem: I cannot use any command. For example, I called <code>ls</code> and it would warn me like this:</p>
  
  <p><code>ls: error while loading shared libraries: __vdso_time: invalid mode for dlopen(): Invalid argument
  </code></p>
  
  <p>I then followed another instruction to run the command as following:</p>
  
  <p><code>/home/MYNAME/dependency/glibc-2.16/lib/ld-linux-x86-64.so.2 --library-path /home/MYNAME/dependency/glibc-2.16/lib:$LD_LIBRARY_PATH:/path/to/gcc-5.2.0/lib64:/usr/lib64/:/usr/lib64/ ls
  </code>
  (I do not know where to find the similar folder as <code>gcc-5.2.0</code>, my <code>which gcc</code> shows <code>/usr/local/sbin/gcc</code>, but it links to <code>/usr/local/gcc-5.3.0/bin/gcc</code>, which doesn't have a lib64 subfolder)</p>
  
  <p>But then it came with the following warning:</p>
  
  <p><code>ls: error while loading shared libraries: ls: cannot open shared object file
  </code></p>
  
  <p>I know that I can use <code>ls</code> again by export the variable to empty. But I still cannot use the new version of glibc. Could anyone help me with how to correctly link the new glibc? Any suggestions would be appreciated!</p>
  
  <p>EDIT:
  So the progress is as following:</p>
  
  <ol>
  <li><p><code>LD_LIBRARY_PATH=/home/MYNAME/dependency/glibc-2.16/lib python</code><br>
  would result in <code>python: error while loading shared libraries: __vdso_time: invalid mode for dlopen(): Invalid argument</code></p></li>
  <li><p><code>/home/MYNAME/dependency/glibc-2.16/lib/ld-2.16.so python</code><br>
  would result in <code>python: error while loading shared libraries: __vdso_time: invalid mode for dlopen(): Invalid argument</code></p></li>
  </ol>
  
  <p>EDIT2 &amp; SUMMARY:</p>
  
  <p>To make Employed Russian's answer more detailed, I would paste my final solutions here. </p>
  
  <p>My goal is to use tensorflow in Python on a server that I do not have the root permission. I was warned that <code>ImportError: /lib64/libc.so.6: version 'GLIBC_2.16' not found</code> when import tensorflow.</p>
  
  <p>Based on Employed Russian's answer, I used the following to run my command:</p>
  
  <p><code>LD_LIBRARY_PATH=/home/USERNAME/dependency/glibc-2.17/lib/:/lib64/:/usr/local/gcc-5.3.0/lib64/ /home/USERNAME/dependency/glibc-2.17/lib/ld-2.17.so /home/USERNAME/anaconda2/bin/python</code></p>
  
  <p>Split the command into the following parts (I would use <code>???</code> to represent the paths that are different for different people.):</p>
  
  <ol>
  <li><code>LD_LIBRARY_PATH=</code>
  
  <ul>
  <li>this part deals with dependencies</li>
  <li><code>:</code> means split</li>
  <li><code>???/glibc-2.17/lib/</code></li>
  <li><code>/lib64/</code> and <code>/usr/local/gcc-5.3.0/lib64/</code>: I found these folders by <code>find / -name 'libgcc_s.so.1'</code> because I was </li>
  </ul></li>
  <li><code>/???/glibc-2.17/lib/ld-2.17.so</code> </li>
  <li><code>/???/python</code> the path of your executable. For Python, <code>import sys; print(sys.executable)</code> to see your Python path.</li>
  </ol>
  
  <p>Other things:</p>
  
  <ol>
  <li>glibc-2.17 is download from <a href="http://www.gnu.org/software/libc/download.html" rel="noreferrer">gnu</a>. I chose 2.17 because tensorflow needs 2.17 and 2.17 works fine.</li>
  <li>There is another problem of this solution. I sometimes need to call shell command in Python like <code>os.system('ls')</code> or <code>os.system('python xxx.py')</code>. But it warned me as following if I used it in its normal way: <code>sh: error while loading shared libraries: __vdso_time: invalid mode for dlopen(): Invalid argument</code> and I haven't found a good enough solution for this.</li>
  </ol>