安裝好ffmpeg后,在終端使用ffmpeg命令時報:
libavdevice.so.58: cannot open shared object file: No such file or
directory
執行命令:
ldd ffmpeg
發現連接不到庫,
這是因為ffmpeg這個編譯好的可執行檔案執行時連接不到它的動態庫導致,
在centos7/ubuntu中:
vim /etc/ld.so.conf
添加:
/usr/local/lib
這個路徑是libavdevice.so.58等ffmpeg編譯好的動態或靜態庫所在的路徑,
然后再執行命令查看:
ldd ffmpeg
發現都可以連接到庫了,
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/340568.html
標籤:其他
