Mapperkids Lee
Mapperkids Lee

Reputation: 155

upgrade glibc 2.12 to 2.14 on Redhat 6.8 to work with Tensorflow and Python

Our server is running on Redhat 6.8 and having the Anaconda Python 3.6.1 installed.

We tried to do import the python module: Keras / Tensorflow and found out we need to upgrade the Glibc from 2.12 to 2.14 in order to make that works.

We are downloaded and installed the Glibc 2.14 as separate installation according to the instruction from this link How to upgrade glibc from version 2.12 to 2.14 on CentOS?

Then we tried to import the Keras module inside the Python python interpreter, it gives us the error "Segmentation fault (core dumped)" error and kicks back out to the OS command prompt. Before we installed the Glibc 2.14, it gives us an error Glibc 2.14 not found.

This is the link we followed to install the Tensorflow from the beginning. https://www.tensorflow.org/install/install_linux#InstallingAnaconda

Anyone know how to solve this issue?

Thank you!

Upvotes: 1

Views: 4591

Answers (1)

Florian Weimer
Florian Weimer

Reputation: 33694

The answer you linked to is incorrect. You can install a second glibc, but you should still compile it with --prefix=/usr (and install it using DESTDIR), and you must run all programs with an explicit linker invocation, similar to what the testrun.sh script in the build root does. For a first trial, you could just run your program binary directly using testrun.sh, without even installing glibc to the destination directory.

The glibc wiki has testing instructions. These apply to running your own application with a freshly built (but not installed) glibc, too.

If you use just LD_LIBRARY_PATH, you will get random crashes because the dynamic linker and the rest of the library do not match. There are some caveats regarding the testrun.sh approach because it does not provide full isolation, but it usually gives quite decent results. However, unlike the LD_LIBRARY_PATH approach, it does not automatically extend to all subprograms launched by the process running under the other glibc.

Note that it may be easier to upgrade to Red Hat Enterprise Linux 7 in this case (which provides glibc 2.17 out of the box).

Upvotes: 1

Related Questions