在Amazon Linux上安装ffmpeg-cpp,gcc和libstdc ++依赖关系 [英] Installing ffmpeg on amazon linux - cpp, gcc & libstdc++ dependancies

查看:93
本文介绍了在Amazon Linux上安装ffmpeg-cpp,gcc和libstdc ++依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于复杂的配置我还是很陌生,&我正在尝试使用此处的说明在亚马逊Linux EC2实例上设置ffmpeg ...

I'm fairly new to complicated config, & am trying to setup ffmpeg on an amazon linux EC2 instance, using the instruction here...

http://wiki.razuna.com/display/ecp/FFMpeg + Installation + on + CentOS +和+ 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

推荐答案

此处介绍如何使用静态版本在Linux上安装FFMPEG.

Here is how to install FFMPEG on Linux using a static build.

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

A good FAQ is here: https://www.johnvansickle.com/ffmpeg/faq/

SSH进入您的实例并成为root

SSH into your instance and become root

sudo su -

转到/usr/local/bin目录

Go to the the /usr/local/bin directory

cd /usr/local/bin

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

Inside the /usr/local/bin directory, create an "ffmpeg" directory

mkdir ffmpeg

进入新目录

cd ffmpeg

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

Now, open a browser and go to the list of FFMPEG static builds at https://johnvansickle.com/ffmpeg/ and pick the latest version.

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

While inside the /usr/local/bin/ffmpeg directory, type the following command to download the static build you have selected

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中创建一个符号链接,如下所示:

If you want to be able to execute FFMPEG from any directory, simply create a symlink into /usr/bin like this:

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

第一部分(/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. The second part (/usr/bin/ffmpeg) is where we want the symlink to go

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

Now, you should be able to run the command "ffmpeg" from anywhere

这篇关于在Amazon Linux上安装ffmpeg-cpp,gcc和libstdc ++依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆