wget http://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz wget http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz tar -zxf glibc-2.15.tar.gz tar -zxf glibc-ports-2.15.tar.gz mv glibc-ports-2.15 glibc-2.15/ports mkdir glibc-build-2.15 cd glibc-build-2.15 ../glibc-2.15/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin make all && make install
解决错误
sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for “.ifdef”
#if defined __i686 && defined __ASSEMBLER__ #undef __i686 #define __i686 __i686 #endif
3. 重新编译
1
make -j $(nproc) && make install
判断当前 GLIBC 版本
1
ldd --version
如下则成功安装
1 2 3 4 5
ldd (GNU libc) 2.15 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the sourcefor copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper.