-bash: dnf: 未找到命令
时间: 2023-11-05 19:56:33 浏览: 373
-bash: dnf: 未找到命令通常表示在当前系统中没有安装dnf命令。要解决这个问题,你可以使用以下方法之一:
1. 确保你已经按照正确的步骤安装了dnf命令。根据引用中提到的方法,在CentOS上安装dnf命令可以使用以下命令:sudo yum install dnf。安装完成后,你可以使用dnf -version命令来验证安装是否成功。中的描述,你可以使用以下命令下载并安装dnf命令的软件包:
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
sudo 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命令查看结果。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [centos 7 dnf命令的安装](https://blog.csdn.net/ximingren/article/details/79189179)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [fedora-hubs-prototype:此仓库已移至](https://download.csdn.net/download/weixin_42104906/18285838)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文