编译报错 /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


相关文章
|
8月前
|
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
344 1
|
C语言
gcc静态编译/usr/bin/ld: cannot find -lc
gcc静态编译/usr/bin/ld: cannot find -lc
|
移动开发 Unix Shell
/bin/bash^M: bad interpreter: No such file or directory
/bin/bash^M: bad interpreter: No such file or directory
127 0
Can‘t exec “autopoint“: 没有那个文件或目录 at /usr/share/autoconf/Autom4te/FileUtils.pm line 345.
Can‘t exec “autopoint“: 没有那个文件或目录 at /usr/share/autoconf/Autom4te/FileUtils.pm line 345.
503 0
Can‘t exec “aclocal“: 没有那个文件或目录 at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
Can‘t exec “aclocal“: 没有那个文件或目录 at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
363 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
258 0
解决办法:/usr/bin/ld: 找不到 -lstdc++
解决办法:/usr/bin/ld: 找不到 -lstdc++
271 0
|
移动开发 Unix Shell
linux解决“/bin/bash^M: bad interpreter“
原因: 在执行shell脚本时提示这样的错误主要是由于shell脚本文件是dos格式,即每一行结尾以\r\n来标识,而unix格式的文件行尾则以\n来标识
232 0