编译报错 /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月前
|
PHP
php 使用phpize报错Cannot find config.m4. Make sure that you run ‘/usr/bin/phpize‘ in the top l
php 使用phpize报错Cannot find config.m4. Make sure that you run ‘/usr/bin/phpize‘ in the top l
182 1
|
10月前
|
C语言
gcc静态编译/usr/bin/ld: cannot find -lc
gcc静态编译/usr/bin/ld: cannot find -lc
未解决: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
226 0
/usr/bin/xsltproc: not found
/usr/bin/xsltproc: not found
122 0
解决办法:/usr/bin/ld: 找不到 -lstdc++
解决办法:/usr/bin/ld: 找不到 -lstdc++
236 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
338 0
|
开发工具 git
/usr/bin/env: escript: No such file or directory的解决办法
/usr/bin/env: escript: No such file or directory的解决办法
448 0
/usr/bin/ld: reader.o: Relocations in generic ELF (EM: 62)
/usr/bin/ld: reader.o: Relocations in generic ELF (EM: 62)
730 0