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:
 * elrepo:
 * epel:
 * extras:
 * updates:
 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
# wget
# wget

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.



Thanks for stopping by!

Help us to help you:

Have a Good day!!

You may also like...

2 Responses

  1. Earl Higgins says:

    This might not be the forum to ask, but I am wondering if anyone knows if there is a reason why modern versions of Centos 7 do not include DNF, given how it has been available in mainstream Fedora for nearly 3 years.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.