下载地址:http://www.gnu.org/software/libc/sources.html
下载最新版本:
git clone git://sourceware.org/git/glibc.git
1、解决configure: error: you must configure in a separate build directory方法 返回上一目录 ../configure
root@centos glibc.2.32]# ./configure
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for readelf... readelf
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ can link programs... no
configure: error: you must configure in a separate build directory
mkdir build
cd build
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
出现以下提示是因为缺少autoconf或版本太低
configure: error:
*** These critical programs are missing or too old: as GNU ld make bison compiler
*** Check the INSTALL file for required versions.
解决方法
wget http://mirrors.ustc.edu.cn/gnu/autoconf/autoconf-2.70.tar.gz
cd autoconf-2.70
./configure --prefix=/usr/local/
make && make install
2、checking version of python... 2.6.6, bad,python版本低,升级python
checking for python3... no
checking for python... python
checking version of python... 2.6.6, bad
configure: error:
*** These critical programs are missing or too old: as GNU ld make bison compiler python
*** Check the INSTALL file for required versions.
Python升级方法参考http://blog.tvtvu.com/thread-336.htm
3、查看glibc版本
ldd --version