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

Source: Internet
Author: User



An executable program was compiled under one of the CentOS versions 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, to collect the relevant information on the Internet and tidy up a bit





This error indicates that the program needs to be 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 several ways to solve this problem by discovering that the system has the highest support for glibc_2.12.





Before you get ready to upgrade the GLIBC library, you need to think about it,
Are you sure you want to upgrade glibc?
Do you know what you're doing?
Http://baike.baidu.com/view/1323132.htm?fr=aladdin

GLIBC is the GNU published LIBC library, the C runtime library. GLIBC is the lowest-level API in a Linux system, and almost any other runtime relies on glibc. GLIBC In addition to encapsulating the system services provided by the Linux operating system, it also provides many other necessary functions for the implementation of the service ...
In general, not saying that some of the applications running on Linux, or the products you have deployed before, are the basic commands of many Linux, such as CP, RM, ll and so on.
Many people on the web have a painful lesson, and even after the upgrade failed the system can not re-enter ...

For systems such as CentOS, for the sake of stability (this is debatable) is often a variety of library versions are very low, such as 6.5 or even 7.0 comes with the glibc2.12, and Ubuntu 14.04 with glibc2.19
Upgrading the base C runtime to a version that is too new may affect the operation of CentOS. So if you encounter the CentOS Basic library problems, affecting the operation of their own programs, you should be able to consider:
1. In the lower version of the system to compile their own products, if their own products do not need a new version of the newly supported features
2. Compile with a high-version system, such as Ubuntu, and CentOS, but may need to be deployed to a lower version, then consider making a better installation package with mock and other technologies, and putting dependencies into the package
3. Using container technology, such as Docker, in the lower version of the operating system, the lightweight isolation out of a virtual operating environment, adapted to your program.
Fortunately, I met the problem is glibc2.15 to meet the requirements of the upgrade temporarily did not find the 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 version 2.12, I have encountered a problem that glibc_2.15 cannot find, so I need to upgrade to at least 2.15
First, download the glibc 2.15 rpm installation package from the Web, but this is not easy because. RPM is for CentOS and Redhat, and a high-version installation package is 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 most safe way is to download the source code in the local compilation once (some people do not compile successfully, it can only find a copy from elsewhere)
Each version of glibc can be found from http://ftp.gnu.org/gnu/glibc/, including its plugins glibc-port
Latest to 2.20, my conservative choice of 2.15
For the low version of GLIBC, there are glibc-linuxthreads-2.x need to compile, can refer to a lot of online documents, but 2.15 no, so no

[Plain]View Plaincopy print?
  1. wget http://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz
  2. wget http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz
  3. TAR-XVF glibc-2.15.tar.gz
  4. TAR-XVF glibc-ports-2.15.tar.gz
  5. MV glibc-ports-2.15 Glibc-2.15/ports
  6. mkdir glibc-build-2.15
  7. CD glibc-build-2.15
  8. .. /glibc-2.15/configure--prefix=/usr--disable-profile--enable-add-ons--with-headers=/usr/include--with-binutils= /usr/bin
  9. Make
  10. Make install





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 glibc-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 to install successfully, go to the shared library where glibc is located:



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


[Plain]View Plaincopy print?
  1. -rwxr-xr-x 1 root root 1921096 02:16/lib64/libc-2.12.so
  2. -rwxr-xr-x 1 root root 9801632 Sep 13:46/lib64/libc-2.15.so
  3. lrwxrwxrwx. 1 root root 18:51/lib64/libcap-ng.so.0-libcap-ng.so.0.0.0
  4. -rwxr-xr-x. 1 root root 18672 June 2011/lib64/libcap-ng.so.0.0.0
  5. lrwxrwxrwx. 1 root root 18:51/lib64/libcap.so.2-libcap.so.2.16
  6. -rwxr-xr-x 1 root root 19016 Dec 8 2011/lib64/libcap.so.2.16
  7. lrwxrwxrwx. 1 root root 18:57/lib64/libcgroup.so.1-libcgroup.so.1.0.40
  8. -rwxr-xr-x 1 root root 97016 Dec 9 2013/lib64/libcgroup.so.1.0.40
  9. -rwxr-xr-x 1 root root 197064 02:16/lib64/libcidn-2.12.so
  10. -rwxr-xr-x 1 root root 267972 Sep 13:46/lib64/libcidn-2.15.so
  11. lrwxrwxrwx 1 root root (SEP) 13:52/lib64/libcidn.so.1-libcidn-2.15.so
  12. lrwxrwxrwx. 1 root root 18:51/lib64/libcom_err.so.2-libcom_err.so.2.1
  13. -rwxr-xr-x 1 root root 17256 Nov 2013/lib64/libcom_err.so.2.1
  14. -rwxr-xr-x 1 root root 40400 02:16/lib64/libcrypt-2.12.so
  15. -rwxr-xr-x 1 root root 142947 Sep 13:46/lib64/libcrypt-2.15.so
  16. lrwxrwxrwx. 1 root root 18:57/lib64/libcryptsetup.so.1-libcryptsetup.so.1.1.0
  17. -rwxr-xr-x 1 root root 97072 June 2012/lib64/libcryptsetup.so.1.1.0
  18. lrwxrwxrwx 1 root root Sep 13:52/lib64/libcrypt.so.1-libcrypt-2.15.so
  19. lrwxrwxrwx  1 root root      12 sep  25 13:52 /lib64/libc.so.6 -> libc-2.15.so  


-rwxr-xr-x  1 root root 1921096 Aug 30 02:16 /lib64/libc-2.12.so
-rwxr-xr-x  1 root root 9801632 Sep 25 13:46 /lib64/libc-2.15.so
lrwxrwxrwx. 1 root root      18 May 19 18:51 /lib64/libcap-ng.so.0 -> libcap-ng.so.0.0.0
-rwxr-xr-x. 1 root root   18672 Jun 25  2011 /lib64/libcap-ng.so.0.0.0
lrwxrwxrwx. 1 root root      14 May 19 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 root      19 May 19 18:57 /lib64/libcgroup.so.1 -> libcgroup.so.1.0.40
-rwxr-xr-x  1 root root   97016 Dec  9  2013 /lib64/libcgroup.so.1.0.40
-rwxr-xr-x  1 root root  197064 Aug 30 02:16 /lib64/libcidn-2.12.so
-rwxr-xr-x  1 root root  267972 Sep 25 13:46 /lib64/libcidn-2.15.so
lrwxrwxrwx  1 root root      15 Sep 25 13:52 /lib64/libcidn.so.1 -> libcidn-2.15.so
lrwxrwxrwx. 1 root root      17 May 19 18:51 /lib64/libcom_err.so.2 -> libcom_err.so.2.1
-rwxr-xr-x  1 root root   17256 Nov 22  2013 /lib64/libcom_err.so.2.1
-rwxr-xr-x  1 root root   40400 Aug 30 02:16 /lib64/libcrypt-2.12.so
-rwxr-xr-x  1 root root  142947 Sep 25 13:46 /lib64/libcrypt-2.15.so
lrwxrwxrwx. 1 root root      22 May 19 18:57 /lib64/libcryptsetup.so.1 -> libcryptsetup.so.1.1.0
-rwxr-xr-x  1 root root   97072 Jun 22  2012 /lib64/libcryptsetup.so.1.1.0
lrwxrwxrwx  1 root root      16 Sep 25 13:52 /lib64/libcrypt.so.1 -> libcrypt-2.15.so
lrwxrwxrwx  1 root root      12 Sep 25 13:52 /lib64/libc.so.6 -> libc-2.15.so


Some people will error after make install. Here's the error I did not go to scrutiny, at this time can look at the system glibc version, refer 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 the build directory compiled a new libc.so.6 (/glibc-build-2.15/libc.so.6, we will find this is actually a soft connection, the real Lib file is libc.so, output


[Plain]View Plaincopy print?
  1. $ ll libc.so.6
  2. lrwxrwxrwx 1 root root 7 Sep 07:41 libc.so.6-libc.so
  3. [Email protected] glibc-build-2.15]$ Strings libc.so | grep GLIBC
  4. glibc_2.2.5
  5. glibc_2.2.6
  6. glibc_2.3
  7. glibc_2.3.2
  8. glibc_2.3.3
  9. glibc_2.3.4
  10. glibc_2.4
  11. glibc_2.5
  12. glibc_2.6
  13. glibc_2.7
  14. glibc_2.8
  15. glibc_2.9
  16. glibc_2.10
  17. glibc_2.11
  18. glibc_2.12
  19. glibc_2.13
  20. glibc_2.14
  21. glibc_2.15
  22. Glibc_private





$ ll  libc.so.6
lrwxrwxrwx 1 root root 7 Sep 23 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
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_PRIVATE


This is the lib we need, then go to update the system library.
Note here that updating the link in the system (my/lib64/libc.so.6) is easy to make mistakes, I don't know if there is any better way, usually delete the old link, create a new link
However, after deleting the old link, many commands are not available, because the GLIBC library is not in the system at this time. At this point, you need to temporarily specify a glibc library, as follows (libc.so change the name so that it is distinguished from other versions later updated):


[Plain]View Plaincopy print?
    1. CP/****/glibc-build-2.15/libc.so/lib64/libc-2.15.so
    2. Rm-rf/lib64/libc.so.6
    3. ld_preload=/lib64/libc-2.15.so ln-s/lib64/libc-2.15.so lib64/libc.so.6



CP/****/glibc-build-2.15/libc.so/lib64/libc-2.15.sorm-rf/lib64/libc.so.6ld_preload=/lib64/libc-2.15.so ln-s/ lib64/libc-2.15.so  lib64/libc.so.6



The update connection is complete, and then





[Plain]View Plaincopy print?
    1. $ STRINGS /LIB64/LIBC.SO.6 | GREP GLIBC  
    2. GLIBC _2.2.5  
    3. GLIBC_2.2.6  
    4. glibc_2.3  
    5. GLIBC_2.3.2  
    6. glibc_2.3.3  
    7. GLIBC_2.3.4  
    8. glibc_2.4  
    9. GLIBC_2.5  
    10. glibc_2.6  
    11. GLIBC_2.7  
    12. glibc_2.8  
    13. GLIBC_2.9  
    14. glibc_2.10  
    15. GLIBC_2.11  
    16. glibc_2.12  
    17. GLIBC_2.13  
    18. glibc_2.14  
    19. GLIBC_2.15  
    20. glibc_private  





$ 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
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_PRIVATE


If the connection update is successful and then compiled, the dependencies of glibc_2.15 and the following versions will not appear.



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



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


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.