技术随笔

version LIBAVUTIL_51 not defined in file

通过locate libavutil.so.51可以知道系统中不止存在一个此库,并使用ldd `which ffmpeg`查看ffmpeg使用了哪一个库文件,
猜想是由于没有加载正确的库文件造成的,因此采用上一个错误的解决方法,问题解决。

 

解决linux下so loading error

 

./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這個目錄下,所以在/etc/ld.so.conf中加入/usr/local/lib這一行,可以解決此問題。
將 /etc/ld.so.conf存檔後,還要執行「/sbin/ldconfig –v」來更新一下才會生效。

 

 

 

posted @ 2012-07-16 22:53  yeeman  阅读(238)  评论(0编辑  收藏  举报