http://unix.stackexchange.com/questions/250249/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 repolistdnf list installed etc. worked (at least on my CentOS 7 system). 应该是yum的epel和 dnf的冲突了 没办法缓存