在RHEL 5.6上安装ffmpeg php时出错

在RHEL 5.6上安装ffmpeg php时出错,php,redhat,ffmpeg-php,Php,Redhat,Ffmpeg Php,我一直在尝试在RHEL(Redhat Enterprise Linux)5.6(Tikanga)环境中安装ffmpeg php v0.6.0。我正在运行PHP版本5.2.17,并安装了以下ffmpeg软件包: ffmpeg-0.6.5-1.el5.rf ffmpeg-devel-0.6.5-1.el5.rf ffmpeg-libpostproc-0.6.5-1.el5.rf 我跟着。我被困在运行make的步骤上,出现以下错误: In file included from /usr/inclu

我一直在尝试在RHEL(Redhat Enterprise Linux)5.6(Tikanga)环境中安装ffmpeg php v0.6.0。我正在运行PHP版本5.2.17,并安装了以下ffmpeg软件包:

  • ffmpeg-0.6.5-1.el5.rf
  • ffmpeg-devel-0.6.5-1.el5.rf
  • ffmpeg-libpostproc-0.6.5-1.el5.rf
我跟着。我被困在运行
make
的步骤上,出现以下错误:

In file included from /usr/include/sys/stat.h:105,
                 from /usr/include/php/main/php_streams.h:28,
                 from /usr/include/php/main/php.h:400,
                 from /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/include/bits/stat.h:88: error: field 'st_atim' has incomplete type
/usr/include/bits/stat.h:89: error: field 'st_mtim' has incomplete type
/usr/include/bits/stat.h:90: error: field 'st_ctim' has incomplete type
/usr/include/bits/stat.h:149: error: field 'st_atim' has incomplete type
/usr/include/bits/stat.h:150: error: field 'st_mtim' has incomplete type
/usr/include/bits/stat.h:151: error: field 'st_ctim' has incomplete type
In file included from /usr/include/php/main/php.h:406,
                 from /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/include/php/TSRM/tsrm_virtual_cwd.h:209: error: expected specifier-qualifier-list before 'time_t'
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c: In function 'zm_startup_ffmpeg':
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:94: warning: implicit declaration of function 'avcodec_init'
我一直在互联网上爬行,看看其他人是否遇到过类似的问题,到目前为止,我已经找到了建议安装旧版本ffmpeg php的网站


我对使用旧版本的东西感到不满,我想知道是否有其他人遇到了上述错误并成功地解决了它们,或者他们是否可以为我指出正确的方向来开始解决它们。

在查找数小时后,似乎出于某种明显的原因,在ffmpeg 1.2.1中使用了time.h(这是我测试的)。这导致了与操作系统自身同名文件的冲突

虽然我不能用PHP编写代码(也几乎看不懂PHP代码),但我发现了一个git repo,它由谁维护,谁对原始项目进行了更改,并且使用他的repo帮助我在CentOS-6.2、CentOS-6.3和CentOS-6.4上成功安装了它(很抱歉,我没有在任何其他口味上测试过这些,但我想如果它在CentOS-6.4上有效,那么它也应该在RHEL 5.x和6.x上有效)

你可以找到回购协议

希望这对你将来有所帮助(也许最终会有人来到这里)


顺便说一句,在写这个答案的时候,ffmpeg 2.0已经发布了,但是我还没有机会测试它。

几天前,我遇到了这个eror。仍然在寻找解决方案。你解决了这个问题了吗?最后关闭了服务器,并使用Ubuntu12.04 LTS构建了一个新的服务器。