编译报错 /usr/bin/ld: cannot find -lc 解决

简介:

今天在编译chkrootkit工具时报错,/usr/bin/ld: cannot find -lc,请教了不少人,在网上找了不少方法尝试终于解决了

先看问题:

wKiom1QpBLvQRWvJAAGDI7AaP6k997.jpg

这问题一般是由于ld在进行库连接时找不到相应的库文件导致的


解决方法:

    出现问题时,先去lib目录下查找相关的库文件:

[root@localhost ~]# cd  /usr/lib

[root@localhost lib]# ll | grep libc.so
lrwxrwxrwx   1 root root       16 Nov 14 22:40 libc.so.6 -> libc-2.12.so

-rwxr-xr-x   1 root root    25484 Dec 16  2009 libc-2.12.so

  上述库文件中没有库的入口: libc.so

可以通过手动建立连接来解决: 

    # ln -s  ./libc.so.6   ./libc.so

但是这个问题主要是少安装了两个软件包:

 glibc-static    glibc-utils


# yum install glibc* -y

wKioL1QpB7ezAJ4GAAD_uce7F9U009.jpg

安装好了以后再编译就没有报错了

wKiom1QpCDTx_7YHAAHoN3HiphM731.jpg

chkrootkit这个工具可以用来检查Linux操作系统,有没有被更换重要文件。

官方地址: http://www.chkrootkit.org/。

详细关于rootkit介绍:http://ixdba.blog.51cto.com/2895551/1557983


本文转自qw87112 51CTO博客,原文链接:http://blog.51cto.com/tchuairen/1559436


相关文章
|
4月前
|
C语言
gcc静态编译/usr/bin/ld: cannot find -lc
gcc静态编译/usr/bin/ld: cannot find -lc
二进制编译安装/usr/bin/ld: cannot find -latomic报错排查思路
排查过程 /usr/bin/ld: cannot find -latomic主要观察这句报错内容,一般出现这种报错,都是缺少了一些函式库文件导致,编译不同的软件,报错错也是都不一样的,相同的一定就是有这句话:/usr/bin/ld: cannot find。
1113 0
二进制编译安装/usr/bin/ld: cannot find -latomic报错排查思路
/usr/bin/xsltproc: not found
/usr/bin/xsltproc: not found
78 0
未解决:lrelease: could not exec ‘/usr/lib/qt5/bin/lrelease‘: No such file or directory
未解决:lrelease: could not exec ‘/usr/lib/qt5/bin/lrelease‘: No such file or directory
137 0
|
Shell 数据库管理
/bin/sh: 1: tclsh: not found
/bin/sh: 1: tclsh: not found
239 0
解决办法:/usr/bin/ld: 找不到 -lstdc++
解决办法:/usr/bin/ld: 找不到 -lstdc++
171 0
|
计算机视觉
谨慎试之:libopencv_core.so.3.4, needed by //usr/local/lib/libopencv_imgcodecs.so
谨慎试之:libopencv_core.so.3.4, needed by //usr/local/lib/libopencv_imgcodecs.so
197 0
/usr/bin/ld: reader.o: Relocations in generic ELF (EM: 62)
/usr/bin/ld: reader.o: Relocations in generic ELF (EM: 62)
586 0
Error: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8‘ not found (required by /usr/anaconda3/bin/)
Error: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8‘ not found (required by /usr/anaconda3/bin/)
472 0
Error: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8‘ not found (required by /usr/anaconda3/bin/)

热门文章

最新文章