CentOS yum 安装 ffmpeg 时间: 2018-12-08 10:23 分类: Linux 以下安装方法转自:[https://www.cnblogs.com/zhangyin6985/p/6513483.html][1] CentOS 6和7安装方法是不一样的,下面分别说明: 安装前都需要先安装epel扩展源 yum -y install epel-release CentOS 6比较简单,安装yum源之后直接安装即可: su -c 'yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-6.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-6.noarch.rpm' yum -y install ffmpeg ffmpeg-devel 而CentOS 7需额外安装扩展源: su -c 'yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm' rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm yum -y install ffmpeg ffmpeg-devel 注意:之前一开始看到一篇文章安装的源是`nux-dextop`,结果安装`ffmpeg`报一大堆的错误,加上`--skip-broken`再次提示很多依赖未按照。所以切勿使用该仓库。我这里踩了这个坑,导致后面装了新的源还是走的`nux-dextop`,于是需要先把之前安装的`nux-dextop`禁用,禁用命令如下: ``` > yum-config-manager --disable nux-dextop ``` **PS:最好还是自己手动编译吧,`yum`安装的版本比较老,测试时发现性能效率太低了,自己编译最新版本问题得以解决。** **官方编译教程:[http://trac.ffmpeg.org/wiki/CompilationGuide][2]** [1]: https://www.cnblogs.com/zhangyin6985/p/6513483.html [2]: http://trac.ffmpeg.org/wiki/CompilationGuide 标签: ffmpeg