Linux/centos under/lib64/libc.so.6:version ' glibc_2.14 ' not Found problem (upgrade glibc2.20) __linux

Source: Internet
Author: User
Upgrade to glibc2.25 when executing configure, reports As,ld, kernel header files are too old. 2.20 is no good, so I had to upgrade to 2.17.
Http://www.th7.cn/system/lin/201612/195752.shtml

The day before yesterday, an executable program was compiled under a version of CentOS and replicated to another CentOS environment, resulting in the following error:

/lib64/libc.so.6:version ' glibc_2.14 ' not found

Seems to be a very common mistake, went to the Internet to collect relevant information and tidy up a bit


This error indicates that the program needs to run glibc_2.14, but it does not exist in the system, so you can use the strings command to view the GLIBC version in the system first

strings/lib64/libc.so.6 | grep GLIBC

There are many ways to solve this problem by discovering that the highest level of support for glibc_2.12 is in the system.

Before you are ready to upgrade the GLIBC library, you should think about it,
Are you really going to upgrade glibc?
Do you know what you're doing?
Http://baike.baidu.com/view/1323132.htm?fr=aladdin GLIBC is the GNU Release LIBC Library, the C Run-time library. GLIBC is the most basic API in a Linux system, and almost any other runtime will rely on GLIBC. In addition to encapsulating the system services provided by the Linux operating system, GLIBC itself provides a number of other essential functional services implementations ...
In general, it doesn't say that some of the apps that run on Linux, or the products you've deployed before, are basic commands for Linux, such as CP, RM, LL, and so on.
Many people on the internet have a bitter lesson, even after the upgrade failed to re-enter the system after the failure ... For systems such as CentOS, for the sake of stability (which is debatable), there are often low versions of libraries, such as 6.5 or even 7.0 from the glibc2.12, and Ubuntu 14.04 with glibc2.19
If you upgrade the base C runtime to a too new version, it may affect the operation of the CentOS. So if you encounter CentOS Basic library problems, affecting the operation of their own programs, should be considered:
1. In the lower version of the system to compile their own products, if their products do not need a new version to support the features
2. With a version of the high system to compile, such as Ubuntu, and CentOS New edition, but may need to deploy to a lower version, you can consider using a mock technology to make better installation package, the dependency into the package
3. The use of container technology, such as Docker, in the lower version of the operating system, the lightweight isolation of a virtual operating environment, adapt to your program.
Fortunately, I encountered the problem is glibc2.15 to meet the requirements of the upgrade has not found a problem, so you can refer to my method:
First look at the existing situation, under CentOS6.5

Ll/lib64/libc.so.6

Libc.so.6 is a soft connection, the current glibc is 2.12 version, I encountered the glibc_2.15 can not find the problem, so need to upgrade to at least 2.15
First of all, download the glibc 2.15 rpm installation package from the Internet, but this is not easy, because. RPM is for CentOS and Redhat, the high version installation package is very rare. You can also directly from other systems to copy a compiled file libc.so.6 (corresponding to glibc 2.15 or higher), but the safest way is to download the source code in the local compile once (some people do not succeed in compiling, it can only be found from somewhere else)
Each version of the glibc can be found from http://ftp.gnu.org/gnu/glibc/, including its plug-ins glibc-port
Newest to 2.20, I conservative option 2.15
For the lower version of GLIBC, there are glibc-linuxthreads-2.x need to compile, can refer to a lot of online documents, but 2.15 did not, so no

wget http://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz wget http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz Tar- XVF glibc-2.15.tar.gz tar-xvf glibc-ports-2.15.tar.gz mv glibc-ports-2.15 glibc-2.15/ports mkdir glibc-build-2.15 cd gli bc-build-2.15.. /glibc-2.15/configure--prefix=/usr--disable-profile--enable-add-ons--with-headers=/usr/include--with-binutils= /usr/bin Make make Install
If prompted install to succeed, look at the shared library where GLIBC resides:

You can see that 2.12 of the old library files are still in the 2.15 version of the library file, and the soft link file all point to 2.15 version.

-rwxr-xr-x 1 root root 1921096 Aug 02:16/lib64/libc-2.12.so-rwxr-xr-x 1 root 9801632 Sep 13:46/lib64/libc-2. 15.so lrwxrwxrwx. 1 root may 18:51/lib64/libcap-ng.so.0-> libcap-ng.so.0.0.0-rwxr-xr-x. 1 root root 18672 June 2011/lib64/libcap-ng.so.0.0.0 lrwxrwxrwx. 1 root May 18:51/lib64/libcap.so.2-> libcap.so.2.16-rwxr-xr-x 1 root root 19016 Dec 8 2011/lib64/libcap. so.2.16 lrwxrwxrwx. 1 root May 18:57/lib64/libcgroup.so.1-> libcgroup.so.1.0.40-rwxr-xr-x 1 root 97016 Dec 9 2013/lib64 /libcgroup.so.1.0.40-rwxr-xr-x 1 root root 197064 Aug 02:16/lib64/libcidn-2.12.so-rwxr-xr-x 1 root 267972 Sep 2 5 13:46/lib64/libcidn-2.15.so lrwxrwxrwx 1 root Sep 13:52/lib64/libcidn.so.1-> libcidn-2.15.so lrwxrwxrwx . 1 root May 18:51/lib64/libcom_err.so.2-> libcom_err.so.2.1-rwxr-xr-x 1 root Nov 17256 2013/lib64 /libcom_err.so.2.1-rwxr-xr-x 1 root root 40400 Aug 02:16/lib64/libcrYpt-2.12.so-rwxr-xr-x 1 root root 142947 Sep 13:46/lib64/libcrypt-2.15.so lrwxrwxrwx. 1 root May 18:57/lib64/libcryptsetup.so.1-> libcryptsetup.so.1.1.0-rwxr-xr-x 1 root root 97072 June 22 201 2/lib64/libcryptsetup.so.1.1.0 lrwxrwxrwx 1 root Sep 13:52/lib64/libcrypt.so.1-> libcrypt-2.15.so lrwxrwx rwx 1 root Sep 13:52/lib64/libc.so.6-> libc-2.15.so Some people will get the error after make install. Here the error I did not go to the scrutiny, at this time can look at the system at this time glibc version, reference to the beginning of the practice. If the version is not upgraded, we can only install it manually:

First make is successful, then we will find that the build directory compiled a new libc.so.6 (/glibc-build-2.15/libc.so.6, we will find that this is actually a soft connection, the real Lib file is libc.so, output

$ ll libc.so.6 lrwxrwxrwx 1 root 7 Sep 07:41 libc.so.6-> libc.so [Usr@linux glibc-build-2.15]$ Strings-libc.so | 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 G libc_2.8 glibc_2.9 glibc_2.10 glibc_2.11 glibc_2.12 glibc_2.13 glibc_2.14 glibc_2.15 glibc_private This is the lib we need, Then go to update the system's library.
Here to note that the update system in the link (my is/lib64/libc.so.6) is very easy to make mistakes, I do not know if there is no better way, is generally to delete old links, create new links
But after deleting the old link, many commands are not available, because the GLIBC library is not in the system at this time. This time, you need to temporarily specify a glibc library, as follows (libc.so renamed to better distinguish it from other versions later):

CP/****/glibc-build-2.15/libc.so/lib64/libc-2.15.so rm-rf/lib64/libc.so.6 ld_preload=/lib64/libc-2.15.so ln-s/ Lib64/libc-2.15.so lib64/libc.so.6
The update connection is complete, and then

$ strings/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 G libc_2.8 glibc_2.9 glibc_2.10 glibc_2.11 glibc_2.12 glibc_2.13 glibc_2.14 glibc_2.15 glibc_private Description Connection update succeeded, then compiled, GLIBC The dependencies of _2.15 and the following versions do not arise.

http://love.junzimu.com/archives/2269

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.