找不到错误libx264


9

我遵循此安装指南。在第3步(安装依赖项):

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

但是在编译时会抛出error libx264 not found错误,为什么会出现此错误以及如何解决呢?


3
这是一个视频解码包,可以与sudo apt-get install libx264-142 libx264-dev

@ 123456您应该添加它作为答案:-)
Seth

Answers:


6

这是因为您正在编译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.

我以为它已经解决了,但是我明白了:使用sudo apt-get install yasm libvpx后无法找到软件包libx264。libx264
Muath 2014年

2
@MoathHowari最后一点libx264.
Braiam 2014年

是的,是的,我现在再次运行installUbuntuDeps.sh,看看错误是否仍然出现。谢谢
Muath 2014年

@Braiam我将为ffmpeg编译ARM处理器。因此,我无法以这种方式安装它,因为那样会为我的PC安装。我应该在./configure命令中为ARM添加已编译的x264文件夹;我这样添加:--extra-cflags =“-I ../ x264” --extra-ldflags =“-L ../ x264”; 但是似乎不起作用。
Dr.jacky 2015年

@ Mr.Hyde我对ARM的构建不了解,但是您没有包含这些标头的-dev软件包吗?IMO,ffmpeg配置脚本应该找到它。
Braiam

1

包括--enable-static --disable-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

1
谢谢,但是没有人知道为什么这样做吗?
Meekohi 2015年

尽管您通常应使用软件包管理器来安装软件,但这会从源代码安装libx264。
David Foerster,2015年

0

AS 123456表示使用sudo apt-get install libx264-142 libx264-dev

这将安装给您错误的libx264。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.