to setup do a image of a fedora distribution myself. i would like to run the dnf package manager (fedora) on debian, as this tool allows to download and install rpm packages in an specified target dir.

Is there an repository , how can i get "dnf installed on a debian/jessie?

something like this would be great

apt-get install dnf

rpm and python3 are already installed. so i just need "dnf"

2 Answers 2


"yum" (predecessor to dnf) exists as package on debian.

apt-get install yum

As yum is to 95% compatible with "dnf" I could achieve what i originally wanted without "dnf", which I still would prefer, to avoid future problems.


I assume that you are talking about a chroot. I was unable to do everything using yum from the repository as in Mandragor's answer, but that was enough to get me bootstrapped. I started by installing yum from the Ubuntu repository, as per that answer:

# apt install yum

then installing the Fedora repository package into my chroot:

# server=https://download.fedoraproject.org
# serverpath=pub/fedora/linux/releases/28/Everything/x86_64/os/Packages/f
# serverfile=fedora-repos-28-1.noarch.rpm
# wget $server/$serverpath/$serverfile
# rpm -i --nodeps --force --root=/srv/chroot/fedora28 $serverfile

and then installing dnf into the chroot:

# yum --installroot=/srv/chroot/fedora28 --releasever=28 install -y \
    --nogpgcheck dnf

After that I was able to continue using dnf in the chroot:

# cp /etc/resolv.conf /srv/chroot/fedora28/etc
# chroot /srv/chroot/fedora28 dnf --releasever=28 install -y --nogpgcheck \
  • I got Error: Invalid version flag: if when trying to install dnf like that.
    – itsadok
    Sep 25, 2019 at 9:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .