checking for ffmpeg headers… configure: error: ffmpeg headers not found. Make sure you’ve built ffmpeg as shared libs using the –enable-shared option

Posted on 9:00 PM by Bharathvn

Took me ages figure this one out. I’d install FFMPEG a number of times previously, no problem. This time round I’m installing it on CENTOS 4, and this error cropped up. After checking I had installed FFMPEG itself with the –enable-shared option the hair pulling and cussing begun. By the way if you want to check you have ffmpeg installed with the shared option do a
ffmpeg -version
The configs should show up. After confirming that you have –enable-shared there, then try the following:

The exact error happens when you phpize the php-ffmpeg file. The error goes something like this:
checking for gawk… gawk
checking for ffmpeg support… yes, shared
checking for ffmpeg headers… configure: error: ffmeg headers not found. Make sure you’ve bult ffmpeg as shared libs using the –enable-shared option

It means basically that the shared files that are requried aren’t in their correct locations. php-ffmpeg is checking /usr/local/include/ffmpeg location and yours are in the /usr/local/include directory. Silly I know, but at least its easily fixed. Run the following commands which copies the files to the new location:


cp /usr/local/include/libavcodec/* /usr/local/include/ffmpeg
cp /usr/local/include/libavutil/* /usr/local/include/ffmpeg
cp /usr/local/include/libavformat/* /usr/local/include/ffmpeg
cp /usr/local/include/libavdevice/* /usr/local/include/ffmpeg
cp /usr/local/include/libswscale/* /usr/local/include/ffmpeg

If you don’t have the libswscale directory don’t loose sleep over it, just ignore it!


checking for ffmpeg headers… configure: error: ffmpeg headers not found. Make sure you’ve built ffmpeg as shared libs using the –enable-shared option

by David Scott on Apr.17, 2008, under ffmpeg

ARGGHGHAHGHGHGHGHGHHG!

Dammit ffmpeg, stop messing with me!

Took me ages figure this one out. I’d install FFMPEG a number of times previously, no problem. This time round I’m installing it on CENTOS 4, and this error cropped up. After checking I had installed FFMPEG itself with the –enable-shared option the hair pulling and cussing begun. By the way if you want to check you have ffmpeg installed with the shared option do a
ffmpeg -version
The configs should show up. After confirming that you have –enable-shared there, then try the following:

The exact error happens when you phpize the php-ffmpeg file. The error goes something like this:
checking for gawk… gawk
checking for ffmpeg support… yes, shared
checking for ffmpeg headers… configure: error: ffmeg headers not found. Make sure you’ve bult ffmpeg as shared libs using the –enable-shared option

It means basically that the shared files that are requried aren’t in their correct locations. php-ffmpeg is checking /usr/local/include/ffmpeg location and yours are in the /usr/local/include directory. Silly I know, but at least its easily fixed. Run the following commands which copies the files to the new location:


cp /usr/local/include/libavcodec/* /usr/local/include/ffmpeg
cp /usr/local/include/libavutil/* /usr/local/include/ffmpeg
cp /usr/local/include/libavformat/* /usr/local/include/ffmpeg
cp /usr/local/include/libavdevice/* /usr/local/include/ffmpeg
cp /usr/local/include/libswscale/* /usr/local/include/ffmpeg

If you don’t have the libswscale directory don’t loose sleep over it, just ignore it!


Now do

make clean

just to be sure. Run the

phpize

command and then try your

./configure

command on php-ffmpeg now.

As a last resort you may need to copy the following files also:
avcodec.h
avformat.h
libio.h

They should all have been copied previously, but just ensure they exist in the /usr/local/include/ffmpeg location.

Maybe just another tiny piece of your hairline saved!!