私はCentosの初心者です。yum コマンドを使用して、サーバーに ffmpeg をインストールしました。ffmpeg-php をインストールしたい。ソースファイルを次からダウンロードしました。
http://ffmpeg-php.svn.sourceforge.net/viewvc/ffmpeg-php/trunk/ffmpeg-php/?view=tar
抽出後、次のコマンドを使用します。
- phpize
- ./configure --enable-shared
しかし、ビルドしようとすると、次のエラーが発生します。
/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
助けてください !!!