glibc is the libc library released by gnu, which is the c runtime library. glibc is the lowest-level API in linux system. Almost any other runtime library depends on glibc . In addition to encapsulating the system services provided by the Linux operating system, glibc itself also provides the implementation of many other necessary functional services. Since glibc covers almost all popular UNIX standards, you can imagine that its content is all-inclusive. Just like other UNIX systems, the file groups it contains are scattered in the tree directory structure of the system, supporting the entire operating system like a scaffold. In the GNU/Linux system, the development history of its C library points out several important milestones in the evolution of GNU/Linux. Using glibc as the system's C library is an important milestone in the evolution of GNU/Linux
1. Situations causing server crash afterglibc package upgrade:
1.Manual manualglibcpackage:
The following glibc installation steps themselves have huge risks.
Download gblic package
wget http://ftp.gnu.org/pub/gnu/glibc/glibc-2.29.tar.gz
Unzip
tar -zxf glibc-2.29.tar.gz
Create a directory
cd glibc-2.29
mkdir build && cd build
Create a compilation environment
apt-get install gawk bison -y
../configure --prefix=/usr/local/glibc-2.29
# 遇到报错configure: error: *** LD_LIBRARY_PATH shouldn't contain the current directory when *** building glibc. Please change the environment variable *** and run configure again
# 解决方法:
export LD_LIBRARY_PATH=
compile
make -j4
Then report an error
Inconsistency detected by ld.so: dl-call-libc-early-init.c: 37: _dl_call_libc_early_init: Assertion `sym != NULL' failed!
Then you enter other commands and still get an error
Inconsistency detected by ld.so: dl-call-libc-early-init.c: 37: _dl_call_libc_early_init: Assertion `sym != NULL' failed!
2.yum install devtoolset-7 software package
Installation command
sudo yum install devtoolset-7
You will find that the devtoolset-7 package depends on glibc, and the gblic package has also been upgraded.
After that, the computer is stuck on the startup page.
2. Solution if it directly causes the server to be unable to log in:
1. Enter safe mode:
Press the e key on the kernel selection interface
As shown in the figure, enter rd.break and then press Ctrl+X to enter safe mode
2. Use the USB disk to boot the disk:
3. Solution to server crash due toglibc package:
1. Copy the normal node’s glibc package to overwrite the previous one glibc< a i=4>Package:
2. Modifyglibcsoft link of package:
Check the version of glibc package
[root@localhost lib64]# ldd --version
ldd (GNU libc) 2.17
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
Check the glibc files: either in /usr/lib or in the /usr/lib64 directory
# libc.so.6是目目标文件,libc-2.17.so是原文件
[root@localhost ~]# cd /usr/lib64
[root@localhost lib64]# ll | grep libc.so
lrwxrwxrwx. 1 root root 12 Oct 8 20:05 libc.so.6 -> libc-2.17.so
Point libc.so.6 to the file libc-2.17.so before modification. If there are multiple similar files, they have been modified together.