在測試的過程中遇到了/usr/lib64/libm.so.6: version `GLIBC_2.29' not found,於是就是需要安裝GLIBC_2.29的包。
過程:
1. 去網站下載:
cd /usr/local/
wget http://ftp.gnu.org/gnu/glibc/glibc-2.29.tar.gz (過程有些慢)
解壓:tar -zxvf glibc-2.29.tar.gz
2.編譯的時候又遇到了:
configure: error: *** LD_LIBRARY_PATH shouldn't contain the current directory when *** building glibc. Please change the environment variable *** and run configure again.
則這個時候需要去掉環境變量了:
[root@localhost build]# echo $LD_LIBRARY_PATH :/usr/local/tmp/glibc_2.29/lib [root@localhost build]# LD_LIBRARY_PATH= [root@localhost build]# echo $LD_LIBRARY_PATH [root@localhost build]#
等編譯結束安裝好后去/etc/profile 文件中添加上以上的環境變量。source /etc/profile 生效;
同時編譯的時候不能在源碼包里,我是在源碼包的上一層目錄,而且百度的其他同學的答案,安裝的路徑也放在/usr 下,我也是這么做的:
[root@localhost build]# Cd /usr/local/
[root@localhost build]#./glibc-2.29/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
##make 也是在/glibc-2.29上一層目錄下make ,如果是在/glibc-2.29 目錄下make ,應該會報“Makeconfig:42: *** missing separator. Stop.”
make
make install
check :
[root@localhost ~]# strings /lib64/libc.so.6 |grep GLIBC_2.29 GLIBC_2.29 GLIBC_2.29
安裝成功