1

我对复杂的配置相当陌生,并且正在尝试使用此处的说明在 amazon linux EC2 实例上设置 ffmpeg ...

http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat

...但是我在尝试以下行时碰壁了...

yum install glibc gcc gcc-c++ autoconf automake libtool

这是我遇到的错误...

Package matching glibc-2.5-107.x86_64 already installed. Checking for update.
Package matching autoconf-2.59-12.noarch already installed. Checking for update.
Package matching automake-1.9.6-2.3.el5.noarch already installed. Checking for update.
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.1.2-54.el5 will be installed
--> Processing Dependency: cpp = 4.1.2-54.el5 for package: gcc-4.1.2-54.el5.x86_64
Package cpp is obsoleted by cpp44, but obsoleting package does not provide for requirements
---> Package gcc-c++.x86_64 0:4.1.2-54.el5 will be installed
--> Processing Dependency: libstdc++ = 4.1.2-54.el5 for package: gcc-c++-4.1.2-54.el5.x86_64
--> Processing Dependency: libstdc++-devel = 4.1.2-54.el5 for package: gcc-c++-4.1.2-54.el5.x86_64
---> Package libtool.x86_64 0:1.5.22-7.el5_4 will be installed
--> Running transaction check
---> Package gcc.x86_64 0:4.1.2-54.el5 will be installed
--> Processing Dependency: cpp = 4.1.2-54.el5 for package: gcc-4.1.2-54.el5.x86_64
Package cpp is obsoleted by cpp44, but obsoleting package does not provide for requirements
---> Package gcc-c++.x86_64 0:4.1.2-54.el5 will be installed
--> Processing Dependency: libstdc++ = 4.1.2-54.el5 for package: gcc-c++-4.1.2-54.el5.x86_64
---> Package libstdc++-devel.x86_64 0:4.1.2-54.el5 will be installed
--> Processing Dependency: libstdc++ = 4.1.2-54.el5 for package: libstdc++-devel-4.1.2-54.el5.x86_64
--> Processing Dependency: /usr/lib64/libstdc++.so.6 for package: libstdc++-devel-4.1.2-54.el5.x86_64
--> Processing Dependency: /usr/lib64/libstdc++.so.6 for package: libstdc++-devel-4.1.2-54.el5.x86_64
--> Processing Conflict: gcc-4.6.2-1.8.amzn1.noarch conflicts libtool < 2.2.10-4.6.2
--> Processing Conflict: gcc-c++-4.6.2-1.8.amzn1.noarch conflicts libtool < 2.2.10-4.6.2
--> Finished Dependency Resolution
Error: Package: gcc-4.1.2-54.el5.x86_64 (centos)
           Requires: cpp = 4.1.2-54.el5
           Installed: cpp46-4.6.2-2.65.amzn1.x86_64 (@amzn-main)
               cpp = 4.6.2-2.65.amzn1
           Available: cpp-4.1.2-54.el5.x86_64 (centos)
               cpp = 4.1.2-54.el5
               cpp = 4.1.1-52.el5
           Available: cpp44-4.4.6-4.77.amzn1.x86_64 (amzn-main)
               cpp = 4.4.6-4.77.amzn1
           Available: cpp47-4.7.0-5.68.amzn1.x86_64 (amzn-main)
               cpp = 4.7.0-5.68.amzn1
           Available: cpp47-4.7.2-2.69.amzn1.x86_64 (amzn-updates)
               cpp = 4.7.2-2.69.amzn1
Error: Package: libstdc++-devel-4.1.2-54.el5.x86_64 (centos)
           Requires: /usr/lib64/libstdc++.so.6
           Available: libstdc++-4.1.2-54.el5.x86_64 (centos)
               Not found
Error: gcc-c++ conflicts with libtool
Error: gcc conflicts with libtool
Error: Package: gcc-c++-4.1.2-54.el5.x86_64 (centos)
           Requires: libstdc++ = 4.1.2-54.el5
           Installed: libstdc++46-4.6.2-2.65.amzn1.x86_64 (@amzn-main)
               libstdc++ = 4.6.2-2.65.amzn1
           Installed: libstdc++47-4.7.2-2.69.amzn1.x86_64 (@amzn-updates)
               libstdc++ = 4.7.2-2.69.amzn1
           Available: libstdc++-4.1.2-54.el5.i386 (centos)
               libstdc++ = 4.1.2-54.el5
               libstdc++ = 4.1.1-52.el5
           Available: libstdc++44-4.4.6-4.77.amzn1.i686 (amzn-main)
               libstdc++ = 4.4.6-4.77.amzn1
           Available: libstdc++47-4.7.0-5.68.amzn1.i686 (amzn-main)
               libstdc++ = 4.7.0-5.68.amzn1
Error: Package: libstdc++-devel-4.1.2-54.el5.x86_64 (centos)
           Requires: libstdc++ = 4.1.2-54.el5
           Installed: libstdc++46-4.6.2-2.65.amzn1.x86_64 (@amzn-main)
               libstdc++ = 4.6.2-2.65.amzn1
           Installed: libstdc++47-4.7.2-2.69.amzn1.x86_64 (@amzn-updates)
               libstdc++ = 4.7.2-2.69.amzn1
           Available: libstdc++-4.1.2-54.el5.i386 (centos)
               libstdc++ = 4.1.2-54.el5
               libstdc++ = 4.1.1-52.el5
           Available: libstdc++44-4.4.6-4.77.amzn1.i686 (amzn-main)
               libstdc++ = 4.4.6-4.77.amzn1
           Available: libstdc++47-4.7.0-5.68.amzn1.i686 (amzn-main)
               libstdc++ = 4.7.0-5.68.amzn1
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
4

2 回答 2

10

以下是如何使用静态构建在 Linux 上安装 FFMPEG。

一个很好的常见问题解答在这里:https ://www.johnvansickle.com/ffmpeg/faq/

SSH 进入您的实例并成为 root

sudo su -

转到 /usr/local/bin 目录

cd /usr/local/bin

在 /usr/local/bin 目录中,创建一个“ffmpeg”目录

mkdir ffmpeg

进入新目录

cd ffmpeg

现在,打开浏览器并转到https://johnvansickle.com/ffmpeg/上的 FFMPEG 静态构建列表并选择最新版本。

在 /usr/local/bin/ffmpeg 目录中,键入以下命令以下载您选择的静态构建

wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz

现在,解压它...

tar -xzf ffmpeg-git-amd64-static.tar.xz

运行它并检查最新版本是什么

./ffmpeg -version

输出应该是这样的

ffmpeg version N-60675-g8fe1076
built on Feb 16 2014 05:45:47 with gcc 4.6 (Debian 4.6.3-1)
configuration: --prefix=/root/ffmpeg-static/64bit --extra-cflags='-I/root/ffmpeg-
static/64bit/include -static' --extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static' --
extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --
disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --
enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --
enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --
enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
libavutil 52. 64.100 / 52. 64.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 32.101 / 55. 32.101
libavdevice 55. 9.101 / 55. 9.101
libavfilter 4. 1.102 / 4. 1.102
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100

如果您希望能够从任何目录执行 FFMPEG,只需在 /usr/bin 中创建一个符号链接,如下所示:

ln -s /usr/local/bin/ffmpeg/ffmpeg /usr/bin/ffmpeg

第一部分(/usr/local/bin/ffmpeg/ffmpeg)是我解压缩文件后文件所在的位置。第二部分(/usr/bin/ffmpeg)是我们希望符号链接去的地方

现在,您应该可以从任何地方运行命令“ffmpeg”

于 2014-02-18T15:26:27.410 回答
-2

您可以从http://ffmpeg.gusari.org/static/64bit下载静态版本。它可以在 64 位 Amzn Linux 上正常运行。

于 2013-05-13T19:36:44.653 回答