简体   繁体   English

在亚马逊 linux 上安装 ffmpeg - cpp、gcc 和 libstdc++ 依赖项

[英]Installing ffmpeg on amazon linux - cpp, gcc & libstdc++ dependancies

I'm fairly new to complicated config, & am trying to setup ffmpeg on an amazon linux EC2 instance, using the instruction here...我对复杂的配置相当陌生,并且正在尝试使用此处的说明在亚马逊 linux EC2 实例上设置 ffmpeg ...

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

... however I've hit a wall when trying the following line... ...但是我在尝试以下行时遇到了困难...

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

Here's the errors I'm getting...这是我得到的错误......

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

Here is how to install FFMPEG on Linux using a static build. 这是使用静态版本在Linux上安装FFMPEG的方法。

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

SSH into your instance and become root SSH进入您的实例并成为root

sudo su -

Go to the the /usr/local/bin directory 转到/ usr / local / bin目录

cd /usr/local/bin

Inside the /usr/local/bin directory, create an "ffmpeg" directory 在/ usr / local / bin目录中,创建一个“ ffmpeg”目录

mkdir ffmpeg

Go into the new directory 进入新目录

cd ffmpeg

Now, open a browser and go to the list of FFMPEG static builds at https://johnvansickle.com/ffmpeg/ and pick the latest version. 现在,打开浏览器,并转到https://johnvansickle.com/ffmpeg/的FFMPEG静态版本列表,然后选择最新版本。

While inside the /usr/local/bin/ffmpeg directory, type the following command to download the static build you have selected 在/ usr / local / bin / ffmpeg目录中,键入以下命令以下载您选择的静态内部版本

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

Now, untar it... 现在,解开...

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

Run it and check what the latest version is 运行它并检查最新版本

./ffmpeg -version

The output should look something like this 输出应如下所示

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

If you want to be able to execute FFMPEG from any directory, simply create a symlink into /usr/bin like this: 如果您希望能够从任何目录执行FFMPEG,只需在/ usr / bin中创建一个符号链接,如下所示:

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

The first part (/usr/local/bin/ffmpeg/ffmpeg) is where the file is located after I untarred the file. 我解压缩文件后,第一部分(/ usr / local / bin / ffmpeg / ffmpeg)是文件所在的位置。 The second part (/usr/bin/ffmpeg) is where we want the symlink to go 第二部分(/ usr / bin / ffmpeg)是我们想要符号链接的位置

Now, you should be able to run the command "ffmpeg" from anywhere 现在,您应该可以从任何地方运行命令“ ffmpeg”

The answer from Marc works good for me.马克的回答对我很有用。 To use the FFProbe (ffprobe gathers information from multimedia streams and prints it in human and machine-readable format), you can add the simlink to it too:要使用 FFProbe(ffprobe 从多媒体流中收集信息并以人类和机器可读的格式打印出来),您也可以向其中添加 simlink:

ln -snf /usr/local/bin/ffmpeg/ffprobe /usr/bin/ffprobe

You could just download the static builds from http://ffmpeg.gusari.org/static/64bit . 您可以从http://ffmpeg.gusari.org/static/64bit下载静态版本。 It works on 64-bit Amzn Linux with no problem. 它可以在64位Amzn Linux上正常运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM