錯誤 libx264 未找到

錯誤 libx264 未找到

我按照這個安裝指導。在步驟 3(安裝依賴項):

sudo ./licode/scripts/installUbuntuDeps.sh在終端

但是在編譯時它拋出了error libx264 not found為什麼我收到這個錯誤,以及如何解決它?

答案1

發生這種情況是因為您正在編譯 libav,--enable-libx264它需要 libx264 標頭才能完成。它在配置階段失敗:

configure: error: libx264 not found

透過安裝所需的標頭包可以輕鬆解決此libx264-dev問題sudo apt-get install yasm libvpx. libx264.,但由於某種原因它不適合您:

sudo apt-get install yasm libvpx. libx264.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libvpx-doc' for regex 'libvpx.'
Note, selecting 'libvpx1-dbg' for regex 'libvpx.'
Note, selecting 'libvpx-dev' for regex 'libvpx.'
Note, selecting 'libvpx1' for regex 'libvpx.'
Note, selecting 'libx264-133' for regex 'libx264.'
Note, selecting 'libx264-142' for regex 'libx264.'
Note, selecting 'libx264-dev' for regex 'libx264.'
libvpx-dev is already the newest version.
libvpx1 is already the newest version.
libvpx1 set to manually installed.
yasm is already the newest version.
libx264-142 is already the newest version.
libx264-142 set to manually installed.
libx264-dev is already the newest version.
The following NEW packages will be installed:
  libvpx-doc libvpx1-dbg
0 upgraded, 2 newly installed, 0 to remove and 24 not upgraded.
Need to get 1,613 kB of archives.
After this operation, 8,027 kB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

答案2

包括--啟用靜態--禁用-opencl

例如-

cd ~/ffmpeg_sources
wget http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
tar xjvf last_x264.tar.bz2
cd x264-snapshot*
PATH="$PATH:$HOME/bin" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static **--disable-opencl**
PATH="$PATH:$HOME/bin" make
make install
make distclean

答案3

作為123456說使用sudo apt-get install libx264-142 libx264-dev

這將安裝為您帶來錯誤的 libx264。

相關內容