usr/bin/ld: cannot find 错误解决方法

参考:http://blog.siyebocai.cn/20100324_5p424qs7.html

 

   通常在软件编译时出现的usr/bin/ld: cannot find -lxxx的错误,主要的原因是库文件并没有导入的ld检索目录中。

 

   解决方式:

 

  1。确认库文件是否存在,比如-l123, 在/usr/lib, /usr/local/lib,或者其他自定义的lib下有无lib123.so, 如果只是存在lib123.so.1,

       那么可以通过ln -sv lib123.so.1   lib123.so,建立一个连接重建lib123.so.

 

   2。检查/etc/ld.so.conf中的库文件路径是否正确,如果库文件不是使用系统路径,/usr/lib, /usr/local/lib, 那么必须在文件中加入。

 

   3。ldconfig 重建ld.so.cache文件,ld的库文件检索目录存放文件。尤其刚刚编译安装的软件,必须运行ldconfig,才能将新安装的

库文件导入ld.so.cache.

 

如果以上方法还是不行,可以采用 软连接的方式,比如 ln -s /usr/local/BerkelyDB5.3.25/lib/libdb.so /usr/lib/libdb.so

 

   4。测试,gcc -l123 --verbose.

时间: 2024-09-20 06:07:45

usr/bin/ld: cannot find 错误解决方法的相关文章

ubuntu 9.04下/usr/bin/ld: cannot find -lperl的解决方法

最近在http://www.aliyun.com/zixun/aggregation/13835.html">Ubuntu10.04中安装nginx,命令如下: ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_perl_module --with-openssl=/home/vince/software/openssl-0.9.8b --with-http_ssl_module

LAMP编译:usr bin ld cannot find lltdl 错误的解决办法

文章来源:http://yangsiwei.com/usr-bin-ld-cannot-find-lltdl-%E9%94%99%E8%AF%AF%E7%9A%84%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95   php在make过程中出现"usr bin ld cannot find lltdl"错误,详细错误如下: /usr/bin/ld: cannot find -lltdl collect2: ld returned 1 exit status ma

Python提示[Errno 32]Broken pipe导致线程crash错误解决方法_python

本文实例讲述了Python提示[Errno 32]Broken pipe导致线程crash错误解决方法.分享给大家供大家参考.具体方法如下: 1. 错误现象ThreadingHTTPServer 实现的 http 服务,如果客户端在服务器返回前,主动断开连接,则服务器端会报 [Errno 32] Broken pipe 错,并导致处理线程 crash. 下面先看个例子,python 版本: 2.7 示例代码 复制代码 代码如下: #!/usr/bin/env python #!coding=ut

/usr/bin/ld: cannot find -lltdl collect2: ld returned 1 exit status make: *** [sapi/cgi/php-cgi] Err

/usr/bin/ld: cannot find -lltdl collect2: ld returned 1 exit status make: *** [sapi/cgi/php-cgi] Error 1 解决办法:  yum install *ltdl*

linux openssl 安装-编译openssl出现/usr/bin/ld: final link failed: Memory exhausted

问题描述 编译openssl出现/usr/bin/ld: final link failed: Memory exhausted 我在linux安装openssl,并参考文章:http://myswirl.blog.163.com/blog/static/513186422007101410149578/,可是make时总是出现/usr/bin/ld: final link failed: Memory exhausted的问题,我用ulimit将stack size增加为16384甚至增加为u

502 bad gateway是什么意思 502 bad gateway错误解决方法_服务器其它

您可以尝试清除浏览器缓存 访问一下你的FTP看是否可以登陆 成功解决502 Bad Gateway错误 今天登陆博客,显示502 bad gateway,NGINX最烦人的地方就是经常会出现这个错误,由于我并不打算在技术上花费过多的时间,所以一般是遇到了相关问题,通过搜索引擎解决后即可,不会去深究.废话不多说,说说我的坎坷经历. 首先,我重启了服务器,可是重启了好几次,都无效,然后去Google搜索了下502 bad gateway,出来了很多的网页,筛选后进入http://lnmp.org/f

ORA-04098错误解决方法

错误|解决 ORA-04098错误解决方法 数据库版本:8.1.5 平台:SOLARIS 5.7   背景: 用户建立了一个TRIGGER:create or replace trigger ddl_denybefore create or alter or drop on databasedeclarebegininsert into ddl_logs values(ora_dict_obj_owner,ora_dict_obj_name,sysdate);exceptionwhen no_d

sql server 2005时发生18452错误解决方法

ODBC 测试sql server 2005时发生18452错误解决方法 用.net开发的网站连接数据库里发生错误,当访问静态页面里显示正常. 1.首先想到的是测试ODBC数据源,当用sql用户和密码登录时出现如下图错误: 2.因为是在客户服务器上安装,所以未设置sa的密码,由于安装时未勾选择了"windows身份验证",所以当你测试sql server 2005的用户时出现此错误. 3.打开"SQL Server Management Studio"双击数据库所在

Linux系统中操作文件数过多导致的错误解决方法

  linux 打开文件数 too many open files 解决方法 too many open files出现这句提示的原因是程序打开的文件/socket连接数量超过系统设定值. 查看每个用户最大允许打开文件数量 代码如下: ulimit -a fdipzone@ubuntu:~$ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 2