Centos8升级glibc2.29与问题总结
安装步骤
wget http://ftp.gnu.org/gnu/glibc/glibc-2.29.tar.gz
tar zxvf glibc-2.29.tar.gz
cd glibc-2.29
mkdir tmpdir
cd tmpdir
../configure --prefix=/usr
make && make install
init 6
问题解决
问题
test ! -x /root/glibc/glibc-2.29/tmpdir/elf/ldconfig || LC_ALL=C \
/root/glibc/glibc-2.29/tmpdir/elf/ldconfig \
/lib64 /usr/lib64
LD_SO=ld-linux-x86-64.so.2 CC="gcc" /usr/bin/perl scripts/test-installation.pl /root/glibc/glibc-2.29/tmpdir/
/usr/bin/ld: cannot find -lnss_nis
/usr/bin/ld: cannot find -lnss_nisplus
collect2: error: ld returned 1 exit status
Execution of gcc failed!
The script has found some problems with your installation!
Please read the FAQ and the README file and check the following:
- Did you change the gcc specs file (necessary after upgrading from
Linux libc5)?
- Are there any symbolic links of the form libXXX.so to old libraries?
Links like libm.so -> libm.so.5 (where libm.so.5 is an old library) are wrong,
libm.so should point to the newly installed glibc file - and there should be
only one such link (check e.g. /lib and /usr/lib)
You should restart this script from your build directory after you've
fixed all problems!
Btw. the script doesn't work if you're installing GNU libc not as your
primary library!
make[1]: *** [Makefile:111: install] Error 1
make[1]: Leaving directory '/root/glibc/glibc-2.29'
make: *** [Makefile:12: install] Error 2
出现/usr/bin/ld: cannot find -lnss_nis
/usr/bin/ld: cannot find -lnss_nisplus
无法链接文件的错误
解决方法
源文件目录搜索test-installation.pl
文件
将128行内容
&& $name ne "nss_test1" && $name ne "libgcc_s") {
修改为
&& $name ne "nss_test1" && $name ne "nss_test2" && $name ne "nss_nis" && $name ne "nss_nisplus" && $name ne "libgcc_s") {
重新运行make install
即可
安装方法与问题解决思路源自于: