/lib64/libc.so.6: version `GLIBC_2.18‘ not found (required by /lib64/libstdc++.so.6)
出現(xiàn)這個問題的主要原因就是,libc.so.6里面缺乏 GLIBC_2.18造成的
可以先用strings命令查看下系統(tǒng)中的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
若出現(xiàn)以下提示問題:
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=
然后再次執(zhí)行:
../configure --prefix=/usr
等待安裝編譯完成再次查看結(jié)果:
strings /lib64/libc.so.6 | grep GLIBC
看到已經(jīng)有GLIBC_2.18的模塊了,驗證項目功能恢復(fù)正常。