如何在CentOS 8上安装FFmpeg

1. 安装步骤

先写简明的安装过程,然后再理解每一步在做什么。

# 安装epel源
dnf install epel-release

# 让我们要用到的仓库生效
# CentOS/RHEL 8 已经添加了 PowerTools 存储库。因此,你只需要启用它。
yum config-manager –set-enabled PowerTools

# 安装yum-utils,否则无法使用yum-config-manager
yum -y install yum-utils

yum-config-manager --add-repo=https://negativo17.org/repos/epel-multimedia.repo

可能会报个错,但不影响

Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/Cent
OS-Epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist

然后会打印如下信息。

Repository epel is listed more than once in the configuration
Adding repo from: https://negativo17.org/repos/epel-multimedia.repo

现在,就可以安装ffmpeg并测试了。

dnf install ffmpeg

ffmpeg -version

ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (GCC)
略

2. 多了解一点儿

先说说YUM

Yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及CentOS中的软件包管理器。基于RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软件包,无须繁琐地一次次下载、安装。

然后说说DNF

DNF 代表 Dandified YUM。DNF 是 YUM 的下一代版本,旨在取代基于 RPM 的系统中的 YUM。它是 CentOS8 的默认包管理器。

再了解一下EPEL

EPEL的全称叫 Extra Packages for Enterprise Linux 。EPEL是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。装上了 EPEL之后,就相当于添加了一个第三方源。

最后,看看PowerTools

在CentOS/RHEL 8系统服务器上提供的PowerTools资源库提供了开发者相关的工具和库。一些常见的EPEL包依赖于PowerTools提供的包,因此,如果你在CentOS系统上设置了EPEL库,建议你启用PowerTools库。因此,如果你已经在CentOS系统上设置了EPEL资源库,建议你也启用PowerTools。

posted @ 2022-05-19 11:21  安全兔  阅读(405)  评论(0编辑  收藏  举报