Installing dependencies on CentOS

CentOS 7

The following instructions are for CentOS 7.6 x86_64.

Basic requirements to run commands:

Dependencies:

Additional dependencies not available in the base repository:

Graphical interface dependencies:

Additional graphical interface dependencies not available in the base repository:

Install dependencies.

sudo yum update
sudo yum groupinstall "Development Tools" "Additional Development"
sudo yum install fribidi-devel git jansson-devel libogg-devel libsamplerate-devel libtheora-devel libvorbis-devel opus-devel speex-devel xz-devel

Install the EPEL repository and related additional dependencies.

sudo yum install epel-release
sudo yum install libass-devel yasm

The opus-devel package provided by CentOS 7 is too old. Install a newer version provided by EPEL for CentOS 61.

sudo yum localinstall $(curl -L -s 'https://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/o/' | grep -Eo 'opus-[^">]+\.x86_64\.rpm' | sort -u | awk '{ print "https://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/o/"$0 }')

The nasm package provided by CentOS 7 is too old. Install a newer version provided by the NASM project2.

sudo curl -L 'https://nasm.us/nasm.repo' -o /etc/yum.repos.d/nasm.repo
sudo yum install nasm

The lame-devel and x264-devel packages are now provided by the RPM Fusion repository. If you previously installed the ZMREPO repository for these packages, remove them and the repository before continuing.

# Only necessary if previously installed ZMREPO
sudo yum repo-pkgs zmrepo remove
sudo yum remove zmrepo

Install the RPM Fusion Free repository and related additional dependencies.

sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
sudo yum install lame-devel x264-devel

The GNU Compiler Collection and related packages provided by CentOS 7 are old. Install and enable a newer version provided by Software Collections (SCL)3. This is recommended for building the HandBrake CLI and required for building the GTK GUI.

sudo yum install centos-release-scl
sudo yum install devtoolset-7
sudo scl enable devtoolset-7 bash

To build the GTK GUI, install the graphical interface dependencies.

sudo yum install dbus-glib-devel gstreamer1-devel gstreamer1-libav gstreamer1-plugins-base-devel intltool libgudev1-devel libnotify-devel webkitgtk4-devel

CentOS is now prepared to build the HandBrake CLI. See Building HandBrake for Linux for further instructions.


  1. Installing newer packages than those available in the base repository may lead to incompatibility with other software expecting specific package versions.

  2. Installing newer packages than those available in the base repository may lead to incompatibility with other software expecting specific package versions.

  3. SCL packages are isolated from base repository versions of similar packages. You can enable and disable these packages using the scl command line tool. For example, disable newer developer tools after compiling HandBrake by running sudo scl disable devtoolset-7 bash.