" /lib64/libc.so.6: version `GLIBC_2.7' not found" Error when installation of R package

16,970

Another idea (this is why I post it as a new answer):

Some distros load the libraries from different places. For example, on Debians, the libc isn't in /usr/lib64, but in /lib/x86_64-linux-gnu . It is not a compatibility problem, because the apps should load the system libraries from the directories configured by the system for them. This app breaks this, it tries to load the libc from a hardwired location, thus it is the fault of the developers of this app.

Check where is your libc.so.6 (most easily you can see that by an

ldd /bin/bash

command), and simply create a soft link to that directory in your /usr/lib64 (the command: ln -sv /my/libc/directory /usr/lib64 ).

Share:
16,970

Related videos on Youtube

Jun
Author by

Jun

Updated on September 18, 2022

Comments

  • Jun
    Jun almost 2 years

    I met a problem when trying to install a R package called "GenomicFeatures",

    Error in dyn.load(file, DLLpath = DLLpath, ...) : 
      unable to load shared object '$HOME/.R325/lib64/R/library/RCurl/libs/RCurl.so':
      /lib64/libc.so.6: version `GLIBC_2.7' not found 
    

    I checked the, the root does not have such a library.

    /usr/lib64

    I noticed the kind suggestion made by eyoung100, which might solve my issue. My knowledge about unix/linux is still in its infancy, it seems to me he suggested a mini version of the whole root, and install the RPM package in the "newroot".

    it seemed to me he suggested to install the whole system, is that necessary?

    Any suggestion? if any information is needed to solve the issue, please kindly let me know.

    • peterh
      peterh over 7 years
      I am sorry that I couldn't provide an easy solution, but what you now try to do, is analoge in the Windows world as if you would want to use an application running on at least Win7, on a WinXP. In the Linux world, it is still possible (also in the Win world), but none of the solutions are easy.
    • Gilles 'SO- stop being evil'
      Gilles 'SO- stop being evil' over 7 years
      What distribution are you running? What version?
    • Jun
      Jun over 7 years
      @Gilles, LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graph‌​ics-4.0-amd64:graphi‌​cs-4.0-ia32:graphics‌​-4.0-noarch:printing‌​-4.0-amd64:printing-‌​4.0-ia32:printing-4.‌​0-noarch Distributor ID: CentOS Description: CentOS release 5.10 (Final) Release: 5.10 Codename: Final
    • Gilles 'SO- stop being evil'
      Gilles 'SO- stop being evil' over 7 years
      This thread on Server Fault suggests that libc 2.7 on CentOS 5 is a lost cause. You should try to recompile the package from source, or upgrade to CentOS 6.
  • Jun
    Jun over 7 years
    you mean install a glib package [like here] (ftp.gnu.org/gnu/libc) in "/mydirectory/libc/directory", and run the command "ln -sv /my/libc/directory /usr/lib64"?
  • Jun
    Jun over 7 years
    my OS is :cat /etc/*-release CentOS release 5.10 (Final), you mention Debians, do your think the same solution also apply to my OS?
  • peterh
    peterh over 7 years
    @Jun Download and extract a binary (precompiled) glibc distribution, ideally a glibc2.7 one. Extract it into a specific directory in your home (for example, /home/jun/glibc4r). Then start the R from the command line, but prefixing with LD_LIBRARY_PATH=/home/jun/glibc4r . Here you give the path which contains the libc.so.6 from your downloaded glibc. It will result that this command, and only this command, will first try to load libraries from your directory, and only then will it check for the system libs.
  • peterh
    peterh over 7 years
    Here is a question with the same problem as yours, check the links in it.
  • Jun
    Jun over 7 years
    I could not find a binary glibc distribution. So I decided to install one from source, but met some issues. I will post a new question about it. A working issue now is when I tried to do configure, I had error complaining my gcc version is too old, but "gcc (GCC) 6.1.0" my gcc far exceed the required indicated in the "INSTALL" file...
  • peterh
    peterh over 7 years
    @Jun The recompilation of the glibc is a funny and quite hard thing. It is much harder to recompile as most software does. You can learn a lot with it. If you won't learn the deeps of the linux, only want a working R quickly, then binary download is more feasible for you. The internet is full with them. In your case I would download the rpm binary of the earliest stable centos release, which uses already glibc-2.7, and then I would extract it (the command: rpm2cpio glibc...rpm|cpio -i -d).
  • Jun
    Jun over 7 years
    it is always good to learn a lot of things, but you are absolutely right, my priority is to make the R package work as soon as possible, no aspiration to become a linux guru. I did not know I could download "rpm", but was looking for "glibc binaries". I will do what you suggested exactly!
  • Jun
    Jun over 7 years
    sorry to bother. I know that I should figure it out by myself. but I could not find the precompiled binaries rpm neither. link provide source, but not binary files. link looks like the right place, but when check the "el5 x86_64" link, the inside looks like something else. Do you have any suggestion?
  • Jun
    Jun over 7 years
    sorry that I just noticed you suggestion here, checking...
  • Jun
    Jun over 7 years
    I found glibc-2.7-2.x86_64.rpm, but when I tried "rpm2cpio glibc-2.7-2.x86_64.rpm|cpio -i -d", I got "23927 blocks".