安装minicaonda时,提示libc.so.6: GLIBC_2.14' not found,需要在服务器上安装GLIBC+2.14

查看服务器支持的glibc版本

在系统执行strings /lib64/libc.so.6 |grep GLIBC_命令,查看当前新系统支持的glib版本,没有2.14版本,需要下载进行升级

1
strings /lib64/libc.so.6 |grep GLIBC_

输出如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_PRIVATE

安装升级

下载glibc2.14

解压并安装

1
2
3
4
5
6
7
8
tar -xvf  glibc-2.14.tar.gz 

tar -xvf glibc-ports-2.14.tar.gz

mv glibc-ports-2.14 glibc-2.14/ports

mkdir glibc-2.14/build

生成makefile

1
2
3
cd glibc-2.14/build 

../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

此时如果没报错那就更好,但我遇到了如下错误:

1
2
3
4
5
6
7
configure: error:

*** LD_LIBRARY_PATH shouldn't contain the current directory when

*** building glibc. Please change the environment variable

*** and run configure again.

解决办法

检查环境变量

1
echo $LD_LIBRARY_PATH

输出后发现末尾多了个:

1
2
echo $LD_LIBRARY_PATH
/usr/local/openssl/lib:

修改环境变量

1
2
3
4
vim /etc/profile
# 新增如下配置

export LD_LIBRARY_PATH=/usr/local/openssl/lib

具体内容可根据自己实际输出进行配置,并使其生效

1
source /etc/profile

此时再执行configure命令就不会报错了。

编译并安装

1
make && make install