ld: cannot find -lxxxx解决方法

默北 运维案例1 24,856字数 318阅读1分3秒阅读模式

在编译软件时,有时会遇到如图所示的错误:
apt-get

1. 原因分析
一般是由于找不到库文件导致的。文章源自运维生存时间-https://www.ttlsa.com/yun_wei_an_li/ld_-cannot-find-lxxxx-solution/

2. 解决方法
xxxx表示的是库文件名称。l是library的简写。图片中缺少的是libncurses
一般是头文件包没安装导致的。
可以先查看下系统有没安装ncurses相关的包文章源自运维生存时间-https://www.ttlsa.com/yun_wei_an_li/ld_-cannot-find-lxxxx-solution/

# yum list | grep ncurses

ubuntu系统下:文章源自运维生存时间-https://www.ttlsa.com/yun_wei_an_li/ld_-cannot-find-lxxxx-solution/

# apt-cache search ncurses

安装开发包文章源自运维生存时间-https://www.ttlsa.com/yun_wei_an_li/ld_-cannot-find-lxxxx-solution/

# yum install ncurses-devel.x86_64

ubuntu系统下:文章源自运维生存时间-https://www.ttlsa.com/yun_wei_an_li/ld_-cannot-find-lxxxx-solution/

# apt-get install libncurses5-dev

对于这类问题,如法炮制屡试不爽。文章源自运维生存时间-https://www.ttlsa.com/yun_wei_an_li/ld_-cannot-find-lxxxx-solution/

如需转载请注明出处:https://www.ttlsa.com/html/2866.html文章源自运维生存时间-https://www.ttlsa.com/yun_wei_an_li/ld_-cannot-find-lxxxx-solution/ 文章源自运维生存时间-https://www.ttlsa.com/yun_wei_an_li/ld_-cannot-find-lxxxx-solution/

weinxin
我的微信
微信公众号
扫一扫关注运维生存时间公众号,获取最新技术文章~
默北
  • 本文由 发表于 06/09/2013 13:05:09
  • 转载请务必保留本文链接:https://www.ttlsa.com/yun_wei_an_li/ld_-cannot-find-lxxxx-solution/
评论  1  访客  1
    • 11
      11 9

      谢谢分享

    评论已关闭!