linux-/usr/lib64/libm.so.6: version `GLIBC_2.29' not found --安装GLIBC_2.29 package

在测试的过程中遇到了/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

安装成功

 

posted @ 2020-10-13 22:17  正霜霜儿  阅读(64946)  评论(8)    收藏  举报