1

我正在尝试安装 ffmpeg 和 ffmpeg-php,但在尝试使用 make 时出现错误。我试图深入了解它,但它让我难住了。我试图找到哪个文件引用了 swscale.h 但没有任何运气。有没有人遇到过这个错误?

root@vps [/usr/local/src/ffmpeg-php-0.6.0]# make
/bin/sh /usr/local/src/ffmpeg-php-0.6.0/libtool --mode=compile gcc  -I. -
I/usr/local/src/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-
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/local/include/php -
I/usr/local/include/php/main -I/usr/local/include/php/TSRM -
I/usr/local/include/php/Zend -I/usr/local/include/php/ext -
I/usr/local/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/  -I/usr/local/include/php -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
gcc -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/local/include/php -
I/usr/local/include/php/main -I/usr/local/include/php/TSRM -
I/usr/local/include/php/Zend -I/usr/local/include/php/ext -
I/usr/local/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/ -I/usr/local/include/php -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
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:46:21: error: swscale.h: No 
such file or directory
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c: In function 'zm_info_ffmpeg':
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:156: error: 'LIBSWSCALE_IDENT' 
undeclared (first use in this function)
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:156: error: (Each undeclared 
identifier is reported only once
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:156: error: for each function 
it appears in.)
make: *** [ffmpeg-php.lo] Error 1
4

2 回答 2

2

安装libswscale-dev在 Debian Squeeze 上帮助了我

于 2013-03-16T09:01:51.547 回答
1

swscale.h好像找不到 您应该检查该文件是否包含在您的 FFmpeg 安装中,如果是,则该 ffmpeg-php 具有指定的正确路径集-I/path/to/includes以找到它。如果没有,您可以添加正确的目录,例如:

CFLAGS=-I/path/to/ffmpeg/includes ./configure
make

如果找不到swscale.h,可能是 FFmpeg 和 ffmpeg-php 版本不匹配。前者的开发非常活跃,ffmpeg-php 期望找到的部分可能不再存在。检查 ffmpeg-php 的文档以查看它是否与特定版本相关联。

于 2012-07-17T19:50:24.573 回答