使用 PHP 执行 FFMPEG shell - 由于 GCC 导致的异常错误
我一直在尝试调试 PHP 脚本,但收到的错误消息非常不寻常。
- CP、MV、WHOAMI - 所有这些命令都与 shell_exec 一起使用
- FFMPEG 安装了
- apache 用户 - nobody,具有对 /usr/bin/ffmpeg 的 nogroup 读写执行权限。
- FFMPEG 在终端中工作正常。
- GCCPP 已安装,GCC 软件包也已安装。
- 使用 shell PHP 命令 (brock@ubuntu~$ php runthis.php)
我运行的代码:
exec('ffmpeg -i beep.mp3 -ac 1 -ar 48000 -ab 128k audio1.mp3 2>&1', $out, $rv);
echo "output is:\n".implode("\n", $out)."\nexit code:$rv\n";
我收到以下错误:
output is: ffmpeg: /opt/lampp/lib/libgcc_s.so.1: version `GCC_4.0.0' not found (required by /usr/lib/libdirac_encoder.so.0) ffmpeg: /opt/lampp/lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6) exit code:1
有人可以帮我吗?
I've been trying to debug the PHP Script, but the error message that I receive is very unusual.
- CP, MV , WHOAMI - all these commands work with shell_exec
- FFMPEG is installed
- apache user - nobody with read write execute permission for nogroup to /usr/bin/ffmpeg.
- FFMPEG working fine in terminal.
- GCCPP is installed and GCC package is also installed.
- Working with shell PHP command (brock@ubuntu~$ php runthis.php)
Code I ran:
exec('ffmpeg -i beep.mp3 -ac 1 -ar 48000 -ab 128k audio1.mp3 2>&1', $out, $rv);
echo "output is:\n".implode("\n", $out)."\nexit code:$rv\n";
I get the following error:
output is: ffmpeg: /opt/lampp/lib/libgcc_s.so.1: version `GCC_4.0.0' not found (required by /usr/lib/libdirac_encoder.so.0) ffmpeg: /opt/lampp/lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6) exit code:1
Can someone help me out here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ffmpeg 正在 /opt/lampp/lib 中查找 libgcc。目前这是一个过时的库。将 libgcc_s.so.1 从 /lib 复制到 /opt/lampp/lib。
ffmpeg is looking in /opt/lampp/lib for libgcc. This is currently an out of date lib. Copy libgcc_s.so.1 from /lib to /opt/lampp/lib.