Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How Centos6.5 upgrades glibc

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "Centos6.5 how to upgrade glibc", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "Centos6.5 how to upgrade glibc" this article.

Scene requirement

Note that there is a certain risk in updating the system library, please operate with caution

The default Centos6.5 glibc version is up to 2.12.When developing Nodejs, the packages that the project relies on often need a higher version of glibc library support, so it is necessary to actively update the system glibc library without upgrading the system. Generally, when you encounter the error libc.so.6: version GLIBC_2.14 not found, it means that glibc needs to be upgraded.

Glibc version

To view the version of the system glibc library, you can use the following command:

$strings / lib64/libc.so.6 | grep GLIBC_

Centos6.5 outputs the following list of glibc versions. From this figure, you can see that the system supports version 2.12 of glibc up to:

In addition, execute $ll / lib64/libc** to see that libc.so.6 at this time is an alias for libc-2.12.so, as shown in the following figure:

Glibc installation

First of all, click here to download glibc, click to download, and get glibc-2.14.tar.gz to use the following command to extract glibc-2.14.tar.gz:

$tar-xzvf glibc-2.14.tar.gz

Get the directory glibc-2.14 under the current directory, execute the $cd glibc-2.14 command to enter the directory, and then execute the following command to compile and install glibc-2.14:

$mkdir build / / create a build folder under the glibc-2.14 directory $cd build / / enter the build directory $.. / configure-- prefix=/opt/glibc-2.14 / / configure glibc and set the current glibc-2.14 installation directory $make & & make install / / compile and install the glibc- 2.14 library

Glibc soft chain

After the installation is complete, set up a soft chain to point to glibc-2.14 and execute the following command:

$rm-rf / lib64/libc.so.6 / / first delete the previous libc.so.6 soft chain $ln-s / opt/glibc-2.14/lib/libc-2.14.so / lib64/libc.so.6

Be careful

Situations that may cause system commands to become unavailable after deleting libc.so.6 can be resolved by using the following methods:

$LD_PRELOAD=/opt/glibc-2.14/lib/libc-2.14.so ln-s / opt/glibc-2.14/lib/libc-2.14.so / lib64/libc.so.6

If the above update fails, you can restore it using the following command:

$LD_PRELOAD=/lib64/libc-2.12.so ln-s / lib64/libc-2.12.so / lib64/libc.so.6 / / libc-2.12.so this is the pre-upgrade version of the system

At this point, view the glibc version of the system as shown in the following figure:

You can see that the maximum version of glibc is 2.14, and the libc.so.6 soft chain points to the following figure:

The above is all the contents of the article "how to upgrade Centos6.5 glibc". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report