I am trying to run a program on a computer running Red Hat 6.5. This results in the three following errors:

"/lib64/libc.so.6: version `GLIBC_2.14' not found"
"/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found"
"/lib64/libm.so.6: version `GLIBC_2.15' not found"

Clearly I have to install those libraries, but when searching I only found solutions that suggest running "sudo apt-get", which I sadly can't (no sudo access). Thus I need a solution to install them without sudo. (EDIT: This system does not have apt-get, but I am under the impression that yum, which it does have, is not far from the same thing. Still requires root though).

Additionally, I would prefer if the solution only affected my account, or even were limited to the program I am trying to run, so I don't affect other users on this system.

I would appreciate if I could receive some help on how to achieve something like this, or if it is impossible, I would like to know that (and out of curiosity, maybe also why).

  • If the application has no user interface and "not too many" dependencies, you could always make it run under a chroot jail, in which you'd copy the required dependencies. – user86969 Feb 19 '15 at 15:15
  • chroot requires root access, so I can't use it. I still appreciate the information though, seems like it could be useful in the future :) – felix Feb 20 '15 at 12:01

I'm betting the program you're trying to run requires a newer version of GLIBC than is current installed on your system. Unfortunately, because it is GLIBC, there is no way to get a newer version without having root access and without affecting the entire system. Check the program's upstream site, make sure it's supported on RHEL 6.

  • 2
    It is possible to get a newer version of glibc without root access. It's painful (you need to download a lot of stuff, extract it in non-standard locations and possibly patch binaries or run them under a ptrace-based wrapper), but it is possible. – Gilles Feb 19 '15 at 23:16
  • I've done this a bunch of times. There are sometimes tricky differences between versions of libc which rely on, for example, kernel changes but most of the time it's been pretty straight forward. You definitely do not need to change your entire system. – Philip Couling Mar 8 at 10:17

So there are two things you need to know here:

  • How to get the library
  • How to use the library

Getting the library

Note I am less familiar with yum than apt-get

It is possible that the version of the lib you need is not available for your distribution. If that's the case, getting the library is more tricky and might require you to build it from source.

If it is available...

You've seen instructions pointing to apt-get. This is a Debian thing (including Ubuntu and Mint). Yum is a similar tool for relatives of Redhat (including Fedora and Centos). Yum is used to install "RPMs" where apt-get installs DPKGs.

Start by:

  1. Download the RPM you need
  2. Extract the RPM

Using the library

You can place the library in any directory you like and then use environment variable LD_LIBRARY_PATH to reference that directory.

There is a snag! As far as I know, there's no way to add to the default library path, only replace it completely. Unlike PATH, LD_LIBRARY_PATH is not set by default. So to set it you will need to every library directory you need:

export LD_LIBRARY_PATH=/home/me/my-libs:/lib:/usr/lib: ... and the rest

If you don't know which lib directories you need then you can analyse your program with ldd before you set the environment variable. Eg:

ldd /bin/bash
    linux-vdso.so.1 (0x00007fff55394000)
    libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007fb13c31f000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb13c319000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb13c12f000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fb13c480000)

Shows that bash needs /lib:/lib64 included.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.