运行某个第三方程序的时候报了这么个错
/lib64/libc.so.6: version `GLIBC_2.25' not found
可以看出来应该是我们的GLIBC版本过低的原因造成的,下面我们用命令查看glibc的版本
strings /usr/lib64/libc.so.6 |grep GLIBC_
输出如下:
[root@DT_Node-172_30_200_209 ~]# strings /usr/lib64/libc.so.6 |grep GLIBC_ 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_2.13 GLIBC_2.14 GLIBC_2.15 GLIBC_2.16 GLIBC_2.17 GLIBC_PRIVATE ___sys_nerr_GLIBC_2_3 ___sys_nerr_GLIBC_2_4 ___sys_nerr_GLIBC_2_1 ___sys_errlist_GLIBC_2_1 ___sys_errlist_GLIBC_2_4 ___sys_errlist_GLIBC_2_3 _IO_file_seekoff@@GLIBC_2.2.5 getservent_r@@GLIBC_2.2.5 _sys_siglist@@GLIBC_2.3.3 _dl_starting_up@@GLIBC_PRIVATE tmpfile@@GLIBC_2.2.5 sched_getaffinity@GLIBC_2.3.3 pthread_cond_wait@GLIBC_2.2.5 regexec@GLIBC_2.2.5 memcpy@@GLIBC_2.14 _IO_file_init@@GLIBC_2.2.5 realpath@GLIBC_2.2.5 realpath@@GLIBC_2.3 __ctype32_tolower@GLIBC_2.2.5 gethostbyname2_r@@GLIBC_2.2.5 getaliasbyname_r@@GLIBC_2.2.5 _IO_file_overflow@@GLIBC_2.2.5 pthread_cond_wait@@GLIBC_2.3.2 getprotoent_r@@GLIBC_2.2.5 regexec@@GLIBC_2.3.4 _rtld_global@@GLIBC_PRIVATE getgrgid_r@@GLIBC_2.2.5 pthread_cond_init@GLIBC_2.2.5 _IO_fsetpos@@GLIBC_2.2.5 GLIBC_2.8 _IO_proc_close@@GLIBC_2.2.5 _sys_nerr@@GLIBC_2.12 pthread_cond_timedwait@@GLIBC_2.3.2 __libc_enable_secure@@GLIBC_PRIVATE pclose@@GLIBC_2.2.5 getaliasent_r@@GLIBC_2.2.5 __tls_get_addr@@GLIBC_2.3 _sys_nerr@GLIBC_2.4 sys_sigabbrev@GLIBC_2.2.5 pthread_cond_broadcast@GLIBC_2.2.5 _IO_proc_open@@GLIBC_2.2.5 posix_spawn@@GLIBC_2.15 getpwnam_r@@GLIBC_2.2.5 _rtld_global_ro@@GLIBC_PRIVATE getrpcbyname_r@@GLIBC_2.2.5 pthread_cond_broadcast@@GLIBC_2.3.2 nftw64@GLIBC_2.2.5 _sys_siglist@GLIBC_2.2.5 _sys_nerr@GLIBC_2.3 _IO_fsetpos64@@GLIBC_2.2.5 __ctype_tolower@GLIBC_2.2.5 __ctype_toupper@GLIBC_2.2.5 _IO_file_underflow@@GLIBC_2.2.5 localeconv@@GLIBC_2.2.5 pthread_cond_timedwait@GLIBC_2.2.5 _IO_file_fopen@@GLIBC_2.2.5 __ctype_b@GLIBC_2.2.5 GLIBC_2.5 _IO_file_finish@@GLIBC_2.2.5 GLIBC_2.9 getgrnam_r@@GLIBC_2.2.5 GLIBC_2.7 GLIBC_2.6 getservbyname_r@@GLIBC_2.2.5 __ctype32_b@GLIBC_2.2.5 _res@GLIBC_2.2.5 __secure_getenv@GLIBC_2.2.5 getnetent_r@@GLIBC_2.2.5 nftw@GLIBC_2.2.5 getpwuid_r@@GLIBC_2.2.5 _IO_fdopen@@GLIBC_2.2.5 posix_spawn@GLIBC_2.2.5 gethostbyaddr_r@@GLIBC_2.2.5 _IO_file_xsputn@@GLIBC_2.2.5 pthread_attr_init@@GLIBC_2.2.5 getrpcbynumber_r@@GLIBC_2.2.5 _IO_fopen@@GLIBC_2.2.5 getnetbyname_r@@GLIBC_2.2.5 memcpy@GLIBC_2.2.5 pthread_cond_signal@@GLIBC_2.3.2 pthread_cond_signal@GLIBC_2.2.5 sys_sigabbrev@@GLIBC_2.3.3 _IO_fgetpos@@GLIBC_2.2.5 posix_spawnp@@GLIBC_2.15 _IO_file_setbuf@@GLIBC_2.2.5 getservbyport_r@@GLIBC_2.2.5 _sys_errlist@GLIBC_2.3 _IO_file_attach@@GLIBC_2.2.5 gethostent_r@@GLIBC_2.2.5 _sys_errlist@GLIBC_2.4 _sys_nerr@GLIBC_2.2.5 nftw64@@GLIBC_2.3.3 _IO_fgetpos64@@GLIBC_2.2.5 __res_maybe_init@GLIBC_PRIVATE fnmatch@@GLIBC_2.2.5 h_errno@GLIBC_PRIVATE _sys_errlist@@GLIBC_2.12 _IO_fclose@@GLIBC_2.2.5 gethostbyname_r@@GLIBC_2.2.5 _IO_do_write@@GLIBC_2.2.5 getspent_r@@GLIBC_2.2.5 getpwent_r@@GLIBC_2.2.5 pthread_cond_destroy@GLIBC_2.2.5 sched_setaffinity@GLIBC_2.3.3 getspnam_r@@GLIBC_2.2.5 sched_setaffinity@@GLIBC_2.3.4 _IO_popen@@GLIBC_2.2.5 getgrent_r@@GLIBC_2.2.5 _IO_file_sync@@GLIBC_2.2.5 GLIBC_2.11 GLIBC_2.16 GLIBC_2.10 pthread_cond_init@@GLIBC_2.3.2 GLIBC_2.17 getprotobyname_r@@GLIBC_2.2.5 GLIBC_2.13 getnetbyaddr_r@@GLIBC_2.2.5 _sys_errlist@GLIBC_2.2.5 _IO_file_write@@GLIBC_2.2.5 pthread_cond_destroy@@GLIBC_2.3.2 nftw@@GLIBC_2.3.3 GLIBC_2.2.6 fopencookie@@GLIBC_2.2.5 __ctype32_toupper@GLIBC_2.2.5 sched_getaffinity@@GLIBC_2.3.4 _dl_argv@@GLIBC_PRIVATE posix_spawnp@GLIBC_2.2.5 getrpcent_r@@GLIBC_2.2.5 getprotobynumber_r@@GLIBC_2.2.5 _IO_file_close_it@@GLIBC_2.2.5 _obstack@GLIBC_2.2.5 [root@DT_Node-172_30_200_209 ~]#
编译安装升级make
[root@DT_Node-172_30_200_209 ~]# mkdir -p ~/make-install && cd ~/make-install [root@DT_Node-172_30_200_209 ~/make-install]# curl -Lk http://ftp.gnu.org/pub/gnu/make/make-4.3.tar.gz | tar xz -C . --strip-components=1 [root@DT_Node-172_30_200_209 ~/make-install]# ./configure --prefix=/usr [root@DT_Node-172_30_200_209 ~/make-install]# ./configure --prefix=/usrtype make [root@DT_Node-172_30_200_209 ~/make-install]# make check [root@DT_Node-172_30_200_209 ~/make-install]# make install [root@DT_Node-172_30_200_209 ~/make-install]# make -v GNU Make 4.3 Built for x86_64-pc-linux-gnu Copyright (C) 1988-2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. [root@DT_Node-172_30_200_209 ~/make-install/make-4.3]#
编译安装升级gcc
[root@DT_Node-172_30_200_209 ~/make-install]# mkdir -p ~/gcc-install && cd ~/gcc-install [root@DT_Node-172_30_200_209 ~/gcc-install]# curl -Lk http://ftp.gnu.org/gnu/gcc/gcc-12.2.0/gcc-12.2.0.tar.gz | tar xz -C . --strip-components=1 [root@DT_Node-172_30_200_209 ~/gcc-install]# ./contrib/download_prerequisites [root@DT_Node-172_30_200_209 ~/gcc-install]# ./configure -enable-checking=release -enable-languages=c,c++ -disable-multilib [root@DT_Node-172_30_200_209 ~/gcc-install]# make -j$(getconf _NPROCESSORS_ONLN) [root@DT_Node-172_30_200_209 ~/gcc-install]# make install Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/12.2.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.2.0 (GCC) [root@DT_Node-172_30_200_209 ~/gcc-install]#
编译安装升级glibc
[root@DT_Node-172_30_200_209 ~/gcc-install]# mkdir -p ~/glibc-install/build && cd ~/glibc-install [root@DT_Node-172_30_200_209 ~/glibc-install]# curl -Lk http://ftp.gnu.org/gnu/glibc/glibc-2.36.tar.gz | tar xz -C . --strip-components=1 [root@DT_Node-172_30_200_209 ~/glibc-install]# cd build [root@DT_Node-172_30_200_209 ~/glibc-install/build]# ../configure --prefix=/usr/local/glibc-2.36 #之所以安装在/usr/local/glibc-2.36目录下,是因为其他的旧的程序可能会需要旧的glibc。 [root@DT_Node-172_30_200_209 ~/glibc-install/build]# make -j$(getconf _NPROCESSORS_ONLN) [root@DT_Node-172_30_200_209 ~/glibc-install/build]# make install
您可以选择一种方式赞助本站
支付宝扫一扫赞助
微信钱包扫描赞助
赏