CentOS7安装dnf报错:No package dnf available

Posted 代码改变世界-Coding

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS7安装dnf报错:No package dnf available相关的知识,希望对你有一定的参考价值。

1.百度中提供的安装办法

yum install epel-release -y
yum install dnf

2. No package dnf available解决办法

运行一下几个命令:

wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/dnf-conf-0.6.4-2.sdl7.noarch.rpm
wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64//dnf-0.6.4-2.sdl7.noarch.rpm
wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/python-dnf-0.6.4-2.sdl7.noarch.rpm
yum install python-dnf-0.6.4-2.sdl7.noarch.rpm  dnf-0.6.4-2.sdl7.noarch.rpm dnf-conf-0.6.4-2.sdl7.noarch.rpm

安装之后执行以下命令:

dnf --version 

输出:

0.6.4                                                                                                                          
Repository epel is listed more than once in the configuration                                                                  
  Installed: dnf-0:0.6.4-2.sdl7.noarch at 2018-03-09 11:31                                                                     
  Built    :  at 2016-10-09 17:18                                                                                              
                                                                                                                               
  Installed: rpm-0:4.11.3-25.el7.x86_64 at 2018-01-09 10:21                                                                    
  Built    : CentOS BuildSystem <http://bugs.centos.org> at 2017-08-03 03:48

安装成功。

以上是关于CentOS7安装dnf报错:No package dnf available的主要内容,如果未能解决你的问题,请参考以下文章

全网最详细的CentOS7里安装MySQL时出现No package mysql-server available错误的解决办法(图文详解)

CentOS7.x 报错 There are no enabled repos.

centos7系统安装报错package

报错:No package erlang available

Centos7安装dnf工具管理rpm包

CentOS7使用dnf安装mysql