【问题标题】:ffmpeg install error on centos 6centos 6上的ffmpeg安装错误
【发布时间】:2026-02-01 22:30:01
【问题描述】:

收到此错误:

[root@web1 ffmpegphp]# make install
Installing shared extensions:     /usr/lib64/php/modules/
cp: cannot stat `modules/*': No such file or directory
make: *** [install-modules] Error 1

有些类似:ffmpeg cannot install PHP extension module

但我找不到“.so”文件:PHP cannot load shared libraries

上面写着“没有为你的 PHP 版本编译 PHP 扩展”

我的服务器 PHP:

[root@web1 ffmpegphp]# phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525

如何更改我的 PHP Api 编号?

【问题讨论】:

标签: ffmpeg centos ffmpeg-php


【解决方案1】:

安装 ffmpeg:

https://trac.ffmpeg.org/wiki/CompilationGuide/Centos

安装 FFmpeg-Php

mkdir ffmpegphp
cd ffmpegphp
wget http ://downloads.sourceforge.net/project/ffmpeg-php/OldFiles/ffmpeg-php-0.6.2.tbz2
tar jxvf ffmpeg-php-0.6.0.tbz2
cd ffmpeg-php-0.6.0
phpize
./configure
make
make install

如果遇到错误: make: *** [ffmpeg_movie.lo] Error 1 when compiling ffmpeg-php

如果安装成功完成ffmpeg.so文件将在/usr/lib64/php/modules/中创建。

转到您的php.ini 路径(CentOS 6.7 中为cd /etc/php.d/)。

创建文件ffmpeg.ini并添加extension=ffmpeg.so

重启httpd

/etc/init.d/httpd restart

注意:如果出现错误请更改版本或安装 ffmpeg-devel

来源:

【讨论】: