Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

When I try to install php5-ffmpeg:

apt-get install php5-ffmpeg

I get an error:

The following packages have unmet dependencies:
 php5-ffmpeg : Depends: phpapi-20090626+lfs

As I understand my php5-ffmpeg was broken when I upgraded php from 5.3 to 5.4.

How can I fix it? I tried some options like -f, -ingnore-dependencies but that did not fix it.

I'm using Ubuntu 12.04.2 LTS.

share|improve this question
Try apt-get install php5-cgi first. –  Nathan C May 29 '13 at 11:05
php5-cgi is already the newest version. –  Victor May 29 '13 at 15:57
Did you add third party repositories/PPAs? Which ones? –  Michael Hampton May 29 '13 at 17:50
Well, I don't know how to check it. I don't remember whether I added or not, probably when I installed php 5.4 or maybe some other packages for LAMP I added some repos if they were mentioned in manuals... –  Victor May 30 '13 at 4:20
Hi, i have a same problem. you have managed to solve the problem? I installed php5.4 from ppa:ondrej/php5 repository. –  Lughino Jul 1 '13 at 20:09

3 Answers 3

phpapi-20090626+lfs is a "virtual package" which another package may "provide". In your case, this is an older virtual package which php5-ffmpeg requires, and which the newer PHP package doesn't provide. The quickest solution just to get everything working, if the PHP upgrade broke it, would be to downgrade PHP.

For a solution using the new PHP, you will need an updated version of php5-ffmpeg, if that's available. I believe this is a package from an external repository (like a PPA), because I don't see it in the normal distribution repositories. If it isn't available, you'll have to try to build it yourself. That might not be possible with the updated versions of ffmpeg and PHP, though ...

Given the specifics of how old php5-ffmpeg is (as detailed here), I would try to change your application to avoid the use of this library in the first place, as it locks you in to (at least) an old version of ffmpeg.

In the mean time, the easiest solution, in my opinion, is to downgrade PHP (and ffmpeg, if necessary) to the supported version.

share|improve this answer

Simple ffmpeg install is enough for using it in php files,but if still you need to install it then try to download files and compile them manually. check this for reference

share|improve this answer

If you take a look at the official webpage for ffmpeg-php, you'll see the date of the last update is 2007. That's why it is recommended you don't use it on any production server, since you have to use an old version of ffmpeg together with ffmpeg-php, which is obviously not a good idea, considering the number of bug fixes created since 2007.

Perhaps a better solution would be to call ffmpeg/ffprobe directly from your web pages to do whatever you need with your audio/video. That way you'll have less of a headache keeping up with new updates of ffmpeg, since command line options usually don't change that much as the API/ABI does. For more help on using ffmpeg from web pages, you could read this tutorial on ffmpeg wiki:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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