操作记录:
root@Linx:/home/work# ldconfig -p | grep 'libc.so'
libc.so.6 (libc6,x32, OS ABI: Linux 3.4.0) => /libx32/libc.so.6
libc.so.6 (libc6,x86-64, OS ABI: Linux 2.6.32) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (libc6, OS ABI: Linux 2.6.32) => /lib32/libc.so.6
root@Linx:/home/work#
root@Linx:/home/work# cp libc.so.6 /usr/local/lib64/
root@Linx:/home/work# ldconfig
root@Linx:/home/work# ls
ls: relocation error: /usr/local/lib64/libc.so.6: symbol _dl_starting_up, version GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with link time reference
root@Linx:/home/work# rm /usr/local/lib64/*
rm: relocation error: /usr/local/lib64/libc.so.6: symbol _dl_starting_up, version GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with link time reference
root@Linx:/home/work# LD_PRELOAD=/lib/x86_64-linux-gnu/libc.so.6 rm /usr/local/lib64/*
root@Linx:/home/work# LD_PRELOAD=/lib/x86_64-linux-gnu/libc.so.6 rm /usr/local/lib64/*
rm: 无法删除"/usr/local/lib64/*": 没有那个文件或目录
root@Linx:/home/work# ldconfig
root@Linx:/home/work# ls
libc.so.6 libstdc++.so.6.0.28
root@Linx:/home/work# ll
总用量 3700
-rw-r--r-- 1 root root 1828080 9月 24 2024 libc.so.6
-rw-r--r-- 1 root root 1956992 9月 9 23:06 libstdc++.so.6.0.28
root@Linx:/home/work#