5

I'm trying to install Tensorflow on Centos 5. Unfortunatelly, after having installed it with pip as explained in the official doc

sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

I have the following error when I try to import tensorflow on a python shell

ImportError: /home/users/caohao/.jumbo/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so: ELF file OS ABI invalid

The following issue on github gave me a lead: https://github.com/tensorflow/tensorflow/issues/350

Actually, tensorflow requires glibc version to be at least 2.17

When I type

ldd --version

I have the following output:

ldd (GNU libc) 2.5

So I need to upgrade glibc. I would like to perform a "parallel" installation, because upgrading glibc could be dangerous for my machine So I downloaded the source, and I use the command

../glibc-2.18/configure --prefix=/opt/glibc-2.18

to install it in an other directory

The problem is that I have the following error when I launch configure

configure: error: assembler too old, .cfi_personality support missing

I think I have to update binutils as well, so I downloaded the sources and install it in /opt/binutils-2.26/ to not harm the system.

Yet I still have the same error when I try to configure glibc.

Here are my questions:

How can I specify which version of binutils I want to use to build glibc ?

EDIT: I should have RTFM, answer is use ‘--with-binutils=directory’ option

How can I make tensorflow looking for the good version of glibc when it will be installed in /opt/glibc-2.18 ?

FYI I use python 2.7.11

Thank you very much and best regards

Mario
  • 99
  • 1
  • 10

2 Answers2

2

I have same problem.

But I used CentOS 6.5 and my GLIBC(GNU libc) version is 2.12.

I tried to changed my GLIBC version manually by removing version 2.12 and installing 2.17.

It occured many problems for it's dependencies and cannot import TensorFlow.

So, I used CentOS 7.0 and it has default GLIBC version 2.17.

I can install and run TensorFlow using CentOS 7.0 without any problem.

Thank you.

Necromancer
  • 869
  • 2
  • 9
  • 25
0

I think tensorflow needs exactly GLIB 2.17 and not 2.18. For some reason it got hardcoded.

See also: Error while importing Tensorflow in python2.7 in Ubuntu 12.04. 'GLIBC_2.17 not found'

Community
  • 1
  • 1
GavinBrelstaff
  • 3,016
  • 2
  • 21
  • 39
  • 2
    Thank you , Anyway I think CentOS 5.6 is too old for running Tensorflow, I updated half of GNU libraries to compile GLIBC 2.17 (GCC, GMP, MPFR, MPC...) and now it seems the linux kernel is too old... – Mario Jan 27 '16 at 11:33