In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1. libc.so.6 Introduction
/usr/lib/libc.so.6 is a soft link to glibc, and the path may be different for different platforms.
Use the command to see:
[root@farmer:~]$ls -l /lib/libc.so.6
lrwxrwxrwx 1 root root 11 Jan 1 22:23 /lib/libc.so.6 -> libc-2.9.so
Glibc is gnu's libc library, the c runtime. Glibc is the lowest api in linux. Almost any other runtime depends on glibc, so most commands don't lack it.
2. error deletion processing
How to delete libc.so.6 by mistake, most system commands will not be executed, ssh login system will not succeed, only the following errors will be endlessly prompted:
error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
In this case, most commands cannot be executed, only a small number of commands such as cd,echo, etc. can be executed, and the practical cp,mv are not available.
After all kinds of Baidu, get the solution (and the premise of this method is that ssh has not been disconnected, if ssh has been disconnected, it cannot be reconnected, you have to use another method to restart with CD to enter emergency mode):
In the same version of the system to see/lib/libc.so.6 is a soft link belonging to libc-2.9.so, therefore, libc-2.9.so file must still exist, mistakenly deleted only soft links, but at this time want to use ln command to re-establish soft links is a failure, but you can force the variable can be executed successfully!
LD_PRELOAD=/lib/libc-2.9.so ln -s /lib/libc-2.9.so /lib/libc.so.6
The red part is the temporary library specified by glibc, so libc.so.6 is restored correctly after proper execution.
3. subsequent
Glibc is a very low-level library, bash also depends on her, so if you kill this library, basically nothing can be done, but why set the LD_PRELOAD variable in front of it? LD_PRELOAD can affect the runtime linker of the program. It allows you to define dynamic link libraries that are loaded first before the program runs. Before libc.so.6, the soft link is killed, so the system cannot find this library. However, by setting the real address of glibc library by LD_PRELOAD, this problem can be solved.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.