Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Tensorflow on centos 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

like image 407
Mario Avatar asked Oct 30 '22 10:10

Mario


1 Answers

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.

like image 161
Necromancer Avatar answered Nov 09 '22 13:11

Necromancer