/lib64/libc.so.6: version `GLIBC_2.18‘ not found (required by /lib64/libstdc++.so.6)
出现这个问题的主要原因就是,libc.so.6里面缺乏 GLIBC_2.18造成的
可以先用strings命令查看下系统中的GLIBC版本:
strings /lib64/libc.so.6 | grep GLIBC
随便找一个目录,依次输入以下命令,即可
wget http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz
tar zxf glibc-2.18.tar.gz
cd glibc-2.18/
mkdir build
cd build/
../configure --prefix=/usr
make -j2
make install
若出现以下提示问题:
configure: WARNING:
*** These auxiliary programs are missing or incompatible versions: makeinfo autoconf
*** some features will be disabled.
*** Check the INSTALL file for required versions.
checking LD_LIBRARY_PATH variable… contains current directory
configure: error:
*** LD_LIBRARY_PATH shouldn’t contain the current directory when
*** building glibc. Please change the environment variable
*** and run configure again.
可以先看下LD_LIBRARY_PATH 的值:
echo $LD_LIBRARY_PATH
有值则清空
export LD_LIBRARY_PATH=
然后再次执行:
../configure --prefix=/usr
等待安装编译完成再次查看结果:
strings /lib64/libc.so.6 | grep GLIBC
看到已经有GLIBC_2.18的模块了,验证项目功能恢复正常。