10

I follow this installation guide. At step 3 (Install Dependencies):

sudo ./licode/scripts/installUbuntuDeps.sh in terminal

But while compiling it throws error libx264 not found Why I got this error, and how to solve it?

2
  • 3
    It is a video decoding package and can be installed with sudo apt-get install libx264-142 libx264-dev
    – user224082
    Jun 10, 2014 at 9:31
  • @123456 You should add that as an answer :-)
    – Seth
    Jun 10, 2014 at 14:41

3 Answers 3

8

It happens because you are compiling libav with --enable-libx264 which would need the libx264 headers to complete. It fails at the configure phase with:

configure: error: libx264 not found

This can be fixed easily installing the needed headers package libx264-dev which should be done with sudo apt-get install yasm libvpx. libx264. but for some reason it doesn't for you:

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.
8
  • I thought it has been solved but I got this: Unable to locate package libx264 after using sudo apt-get install yasm libvpx. libx264
    – Muath
    Jun 11, 2014 at 13:37
  • 2
    @MoathHowari it has a point at the end libx264.
    – Braiam
    Jun 11, 2014 at 13:38
  • Yep you are right, Ill run installUbuntuDeps.sh again now,and see if the error still appears or not. thanks
    – Muath
    Jun 11, 2014 at 13:43
  • @Braiam I'm going to compile ffmpeg for ARM processor. So I can't install it as that way, because that way install for my PC. I should add compiled x264 folder for ARM, in ./configure command; I added this like: --extra-cflags="-I../x264" --extra-ldflags="-L../x264"; But seems doesn't work.
    – Dr.jacky
    Dec 9, 2015 at 9:13
  • @Mr.Hyde I'm not knowledgeable about ARM's builds but don't you have a -dev package that includes those headers? IMO, ffmpeg configure script should find it.
    – Braiam
    Dec 9, 2015 at 12:33
1

include --enable-static --disable-opencl

eg -

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
2
  • 1
    Thanks, but does anyone understand why this works?
    – Meekohi
    Dec 7, 2015 at 15:48
  • This installs libx264 from source, though you should usually use the package manager to install software. Dec 9, 2015 at 12:36
0

AS 123456 said use sudo apt-get install libx264-142 libx264-dev

This will install the libx264 that gave you the error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.