How To Install DNF On CentOS 7

Install DNF On CentOS 7

DNF (“DaNdiFied Yum”) is the next upcoming major version of Yum, a package manager for RPM-based Linux distributions, such as RHEL, CentOS, and Fedora. DNF is first introduced in Fedora 18, and it has became the default package manager from Fedora 25 version. This brief tutorial will explain how to install DNF on CentOS 7 / RHEL 7 versions.

Install DNF On CentOS 7

I know DNF is not available yet in the default repositories of CentOS 7. But, I wasn’t aware that DNF is not available in the EPEL repository too.

When I tried try to install DNF from EPEL, I got this error:

# yum install dnf
 Loaded plugins: fastestmirror
 Loading mirror speeds from cached hostfile
 * base: ftp.iitm.ac.in
 * elrepo: elrepo.mirror.angkasa.id
 * epel: kartolo.sby.datautama.net.id
 * extras: ftp.iitm.ac.in
 * updates: ftp.iitm.ac.in
 Nothing to do

See? DNF is not available in EPEL anymore. After a few google searches, I found the work around in Serverfault forum. The reason of the DNF removal from EPEL repository is EPEL 7 DNF is very old and has issues to include security flaws. This is why DNF was removed from EPEL.

Thankfully, DNF and its dependencies are available at Springdale Linux (SDL) repository. This repository is being maintained by the members of the computing staff of Princeton University and the Institute for Advanced Study.

Let us download DNF and its dependencies using commands:

# wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64//dnf-0.6.4-2.sdl7.noarch.rpm
# wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/dnf-conf-0.6.4-2.sdl7.noarch.rpm
# wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/python-dnf-0.6.4-2.sdl7.noarch.rpm

Then, install DNF using command:

# yum install dnf-0.6.4-2.sdl7.noarch.rpm dnf-conf-0.6.4-2.sdl7.noarch.rpm python-dnf-0.6.4-2.sdl7.noarch.rpm

Now start using DNF. To get your hands on DNF, refer the help section by running the following command.

# dnf help

A word of caution: Please be mindful that the packages from the above mentioned link are unsupported and not included in the stock RedHat installation. These unsupported packages may not be updated frequently or maintained. Use them at your own risk.

New to DNF? Read our next article to know how to use DNF package manager.

Cheers!

Reference:

Thanks for stopping by!

Help us to help you:

Have a Good day!!

You may also like...

1 Response

Leave a Reply

Your email address will not be published. Required fields are marked *