Error after installing dnf on CentOS 7
I am not sure why this is, but it looks like the epel-release repository (from where you install dnf
) is not compatible with dnf
itself. After installing dnf
, first remove this using yum
:
yum remove epel-release
and after that:
dnf repolist
dnf list installed
etc. worked (at least on my CentOS 7 system).
The issue may have to do with the installed version of libsolv not supporting bzip2 compression. Like me, you may not have the most recent version being installed because setting priorities in the repo config files.
Failed to open: /var/cache/dnf/x86_64/7/x86_64/7/epel/...xml.bz2
See bug report 1258416.
libsolv-0.6.14-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
The libsolv installed from the CentOS base
repository is 0.6.11-1.el7, but the one in epel
is 0.6.14-1.el7.
yum --showduplicates --disablerepo=base list libsolv
Installed Packages
libsolv.x86_64 0.6.11-1.el7 @base
Available Packages
libsolv.x86_64 0.6.14-1.el7 epel
Solution
Install libsolv from the epel
repository.
yum --disablerepo=base install libsolv-0.6.14-1.el7
Edit: 2016-06-17
As seen in the comments, this is still an active bug with the package repositories. This is because of libsolv
being marked as "retired" in the EPEL without an explanation (Theodor van Nahl). Dennis M. Pöpperl points out that RPMs of versions that had seemed to have been working in CentOS and RHEL are available here in the Fedora build system.