6

Installed dnf according to these instructions:

yum install epel-release -y
yum install dnf

after that dnf --version works fine but dnf repolist or anything else gives:

Extra Packages for Enterprise Linux 7 - x86_64  668 kB/s | 9.4 MB     00:14
Failed to open: /var/cache/dnf/x86_64/7/x86_64/7/epel/repodata/e8...19-updateinfo.xml.bz2.

and running dnf clean all doesn't solve this.

There seems to be bug report about this, without a solution.

Is there some way to get dnf working on CentOS 7?

  • Have you tried to remove the epel-release (using yum remove epel-release) and then run dnf repolist? – Anthon Dec 18 '15 at 16:40
  • I did not see anywhere that you had to do that, but after remove it looks like it is working. Thank you. – user148019 Dec 18 '15 at 16:53
8

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

5

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.

  • Kevin's answer was spot on, but I couldn't find the 'new' libsolv in epel, but I did find a 0.6.20 version in epel-testing, which solved my issue ... thanks, Kevin! – user168671 May 3 '16 at 8:19
  • 1
    @Bob3396, now both libsolv-0.6.14 and 0.6.20 seem to have been removed from the EPEL repository. I noted this in the bug report. – Kevin May 11 '16 at 20:53
  • 1
    The lack of a libsolv version in EPEL 7 can been seen here. – Kevin May 11 '16 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.