How to update glibc to 2.14 in CentOS 6.5

  • I want to install Android NDK on my CentOS 6.5 machine. But when I ran the program, it says it needs glibc 2.14 to be able to run. My CentOS 6.5 only has Glibc 2.12 installed. So I tried to update glibc by:

    $ sudo yum update glibc

    But after that I found the glibc version is still 2.12, not 2.14.

    $ ldd --version
    ldd (GNU libc) 2.12

    I think glibc 2.14 may not be available on CentOS repositories. So how can I update it to glibc 2.14 on CentOS 6.5?

    It's easier to upgrade to CentOS7 which contains GLibC 2.14 than it is to upgrade GLibC from 2.12 to 2.14. See Skype Call Recorder

    @eyoung100 I still need CentOS 6.5 rather than 7. Is there an easy way to upgrade Glibc to 2.14? Thx!

    Based on your answers, it seems that the best solution will be either upgrading to CentOS 7 or using an older version of NDK which requires glibc 2.12. Thanks for your comments.

    You could also install a CentOS7 chroot to run the NDK in.

    Not glibc-2.14 but glibc-2.17 and working good on CentOS 6.10:

  • You cannot update glibc on Centos 6 safely. However you can install 2.14 alongside 2.12 easily, then use it to compile projects etc. Here is how:

    mkdir ~/glibc_install; cd ~/glibc_install 
    tar zxvf glibc-2.14.tar.gz
    cd glibc-2.14
    mkdir build
    cd build
    ../configure --prefix=/opt/glibc-2.14
    make -j4
    sudo make install
    export LD_LIBRARY_PATH="/opt/glibc-2.14/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"

    Want to mention, that builing process takes 2.5 hours on slow AWS. Maybe useful for someone the next info: instruction above fixes `psycopg2` issue `ImportError: /lib/ version 'GLIBC_2.14'` (I use Centos 6.5 and PostgreSQL v 9.6)

    Brilliant answer! I followed this answer exactly and it worked like a charm. Thank you

    Can also be used for later versions; simply change "2.14" to "2.23" or whatever version you need, as highlighted by things like: `/usr/local/lib/ undefined reference to '[email protected]_2.23'` (the last few digits are the version). To make the compile faster, use make -j8 if you have 8 threads on your cpu etc. Mine completed in few minutes.

    I'm left with `relocation error: symbol _dl_find_dso_for_object, version GLIBC_PRIVATE not defined in file with link time reference` after the export phase (when trying any command). Can anyone help? @Roel

    Thanks man, worked as expected on `CENTOS 6.10`. I replaced this line `sudo make install` with `make install` while I was root, because my user was not in the sudoers file

    Beware that setting `LD_LIBRARY_PATH` comes with its own *host* of problems. It’s not an ideal solution by a long shot.

  • To install glibc 2.14 in parallel, add the configure prefix:

    tar zxvf glibc-2.14.tar.gz
    cd glibc-2.14
    mkdir build
    cd build
    ../configure --prefix=/opt/glibc-2.14
    make -j4
    make install

    Following this process, you'll be able to build 2.14 but you will need to tell the compiler where to look for glibc.

    Below are the ways you can expose the glibc to your program.

    1. LD_LIBRARY_PATH=/opt/glibc-2.14/lib

      export LD_LIBRARY_PATH.

      The library is exposed during your current login session.

    2. You can permanently link your new glibc version like so, but please read the WARNING below:

      ln -sf /opt/glibc-2.14/ /lib/

    Since is just a symbolic link. Executing the above command will make the link point towards the new glibc library. However this step is not recommended since there are many programs in Linux which depend on older versions and will stop working.

    +1 for the details of exposing the library

  • Common alternative technique. Installing GLIBC 2.14 in parallel (Intall it to the /opt directory) Then it is available to the programs which require it without breaking your core OS.

    How would you do this? Download an rpm and ?

License under CC-BY-SA with attribution

Content dated before 6/26/2020 9:53 AM