FIX:- error: ffmpeg headers not found. Make sure you’ve built ffmpeg as shared libs

Sometime while compiling FFMPEG-PHP it doesn’t detect FFMPEG as shared lib and throws following Error evern if you have compilied FFMPEG as shared Libs

checking for ffmpeg support... yes, shared
checking for ffmpeg headers... configure: error: ffmpeg headers not found. Make sure you've built ffmpeg as shared libs using the --enable-shared option
Managed WordPress Hosting

The main reason for this problem is that some libraries of various modules doesn’t gets copied in FFMPEG include directory. To fix this issue, just copy and paste following commands after FFMPEG Installation

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

Now try to compile FFMPEG-PHP and let me know if the error persists (I am sure that this will fix the issue).

Published by Mike

Milind Koyande loves to work on new technologies specially virtualization and troubleshoot server problems. I’m an avid photographer and love to spend my free time close to nature, trying to capture its glory on my camera.

Join the Conversation

1 Comment

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.