ffmpeg-php安装显示centos中的错误

时间:2013-01-29 10:49:08

标签: linux ffmpeg centos fedora ffmpeg-php

我是Centos的新手。我使用yum命令在我的服务器中安装了ffmpeg。我想安装ffmpeg-php。我从以下网址下载了源文件:

http://ffmpeg-php.svn.sourceforge.net/viewvc/ffmpeg-php/trunk/ffmpeg-php/?view=tar

提取后,我使用以下命令:

  1. phpize
  2. ./ configure --enable-shared
  3. 但是当我尝试进行构建时,会出现以下错误:

    /bin/sh /usr/local/src/ffmpeg-php-0.6.0/libtool --mode=compile cc  -I. -I/usr/local
    
    /src/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php-0.6.0/include -I/usr/local/src/ffmpeg-php-0.6.0/main -I/usr/local/src/ffmpeg-php-0.6.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/libavcodec/ -I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -I/usr/local/include/libavdevice/  -DHAVE_CONFIG_H  -g -O2 -Wall -fno-strict-aliasing   -c /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c -o ffmpeg-php.lo 
    libtool: compile:  cc -I. -I/usr/local/src/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php-0.6.0/include -I/usr/local/src/ffmpeg-php-0.6.0/main -I/usr/local/src/ffmpeg-php-0.6.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/libavcodec/ -I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -I/usr/local/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c  -fPIC -DPIC -o .libs/ffmpeg-php.o
    In file included from /usr/include/sys/stat.h:107,
                     from /usr/include/php/main/php_streams.h:28,
                     from /usr/include/php/main/php.h:405,
                     from /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
    /usr/include/bits/stat.h:73: error: field ‘st_atim’ has incomplete type
    /usr/include/bits/stat.h:74: error: field ‘st_mtim’ has incomplete type
    /usr/include/bits/stat.h:75: error: field ‘st_ctim’ has incomplete type
    /usr/include/bits/stat.h:119: error: field ‘st_atim’ has incomplete type
    /usr/include/bits/stat.h:120: error: field ‘st_mtim’ has incomplete type
    /usr/include/bits/stat.h:121: error: field ‘st_ctim’ has incomplete type
    In file included from /usr/include/php/main/php_streams.h:28,
                     from /usr/include/php/main/php.h:405,
                     from /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
    /usr/include/sys/stat.h:367: error: array type has incomplete element type
    /usr/include/sys/stat.h:374: error: array type has incomplete element type
    In file included from /usr/include/php/main/php.h:411,
                     from /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
    /usr/include/php/TSRM/tsrm_virtual_cwd.h:212: error: expected specifier-qualifier-list before ‘time_t’
    /usr/include/php/TSRM/tsrm_virtual_cwd.h:240: error: expected declaration specifiers or ‘...’ before ‘time_t’
    In file included from /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:46:
    /usr/local/include/libswscale/swscale.h:140: warning: ‘enum AVPixelFormat’ declared inside parameter list
    /usr/local/include/libswscale/swscale.h:146: warning: ‘enum AVPixelFormat’ declared inside parameter list
    /usr/local/include/libswscale/swscale.h:189: warning: ‘enum AVPixelFormat’ declared inside parameter list
    /usr/local/include/libswscale/swscale.h:316: warning: ‘enum AVPixelFormat’ declared inside parameter list
    make: *** [ffmpeg-php.lo] Error 1
    

    请帮助!!!

2 个答案:

答案 0 :(得分:1)

在你的ffmpeg-php *文件夹中,将扩展名为“.loT”的所有文件更改为扩展名“lo”

答案 1 :(得分:0)

我不确定这是否是正确的解决方案,

  

在你的ffmpeg-php *文件夹中,更改所有扩展名为'.loT'的文件   扩展'lo'

只需通过git命令从ffmpeg网站下载软件包并配置它,

# yum install git
#  git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
# ./configure --enable-shared ... ...

我希望这个问题能够解决。