Can i install dnf on debian?

32,298

Solution 1

"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.

Solution 2

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 \
    <packages...>
Share:
32,298

Related videos on Youtube

Mandragor
Author by

Mandragor

Updated on September 18, 2022

Comments

  • Mandragor
    Mandragor over 1 year

    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"

  • itsadok
    itsadok over 4 years
    I got Error: Invalid version flag: if when trying to install dnf like that.