天天看點

./ffmpeg: error while loading shared libraries: libx264.so.138: cannot open shared object file: No s

在安裝ffmpeg時,執行完

./configure--enable-libx264 --enable-gpl --disable-yasm --prefix=/usr/local/ffmpeg

make

都沒有錯誤

但是在向rtmp伺服器推流的時候

./ffmpeg -re -i /media/jxs2.rmvb -vcodec libx264 -f flv"rtmp://192.168.5.200:1935/live/a2"

出現以下錯誤

./ffmpeg: error while loading shared libraries: libx264.so.138: cannot open shared object file: No such file or directory

解決方法:

1. 檢視ld.so.conf檔案

vi /etc/ld.so.conf

添加/usr/local/x264/lib,如下

include ld.so.conf.d/*.conf

/usr/local/x264/lib

wq退出ld.so.conf檔案

2. 執行 ldconfig

繼續閱讀