error while loading shared libraries

本文介绍了当使用FFmpeg遇到共享库加载错误时的解决方法。主要针对找不到libavdevice.so.52的情况,通过修改ld.so.conf文件并运行ldconfig来解决问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


FFmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file Thursday, June 28, 2012 12:33:35 AM Asia/Calcutta Getting the error when running the command 

>> ffmpeg ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file   

Which means the file is either missing or the server was unable to locate the libraries path,   

Locate the file using >> find / -iname libavdevice.so.52 If you get an output, enter the location of the library to the ld.so.conf file. >> vi /etc/ld.so.conf Say, 

if the library is located at /opt/lib/libavdevice.so.52.so, add /opt/lib to ld.so.conf file.  

After adding the path to the library, run the below command to make sure the system takes the library path.   >> ldconfig -v


链接:http://www.webhostrepo.com/blog/ffmpeg-error-while-loading-shared-libraries-libavdevice-so-52-cannot-open-shared-object-file/





Linux下运行程序时,发现了error while loading shared libraries这种错误,一时间不知道解决办法,在网上搜索,终于解决了:

 

./tests: error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory
出现这类错误表示,系统不知道xxx.so放在哪个目录下,这时候就要在/etc/ld.so.conf中加入xxx.so所在的目录。

一般而言,有很多的so会存放在/usr/local/lib这个目录底下,去这个目录底下找,果然发现自己所需要的.so文件。

所以,在/etc/ld.so.conf中加入/usr/local/lib这一行,保存之后,再运行:/sbin/ldconfig –v更新一下配置即可。





链接:http://blog.csdn.net/dumeifang/article/details/2963223

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值