libc.so.6: version `GLIBC_XXX' not found

风行水上 @ 2015-03-20 05:19:44
标签:

    问题出现的原因显然是当前系统的GLIBC版本太低。

    检查自己胡GLIBC版本

    $ strings /lib64/libc.so.6 |grep GLIBC_ 
    
    $ rpm -qa |grep glibc 
    

    自己下载编译一份新的GLIBC

    mkdir build && cd build
    ../configure --prefix=/opt/glibc-2.14
    make -j4
    make install
    
    # 使用 -j4 制定并行编译进程个数
    
    • 使用:
    export D_LIBRARY_PATH=/opt/glibc-2.14/lib:$LD_LIBRARY_PATH
    

    GLIBC 的编译

    configure: error: assembler too old, .cfi_personality support missing

    • Update "binutils" package

    error while loading shared libraries: ELF file OS ABI invalid

    原因简单说就是:

    Until relatively recently, Linux ELF binaries used the System V ABI. Recently, in support of STT_GNU_IFUNC, the Linux ABI was added.

    Ref: http://stackoverflow.com/questions/7647818/glibc-elf-file-os-abi-invalid

    解决办法,简单说,就是需要加上configure --disable-multi-arch选项。

    # 没有 --disable-multi-arch 时
    % file libc.so
    ELF 64-bit LSB shared object, AMD x86-64, version 1 (GNU/Linux), for GNU/Linux 2.4.0, not stripped
    
    # 加上 --disable-multi-arch 后
    % file libc.so
    ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, not stripped
    

    网络资源

    标签:

      分享到:
      comments powered by Disqus

      28/18ms