centos怎么安装yum
时间: 2023-10-19 19:24:45 浏览: 199
在CentOS操作系统下安装yum的步骤如下:
1. 首先,查看已安装的yum包。可以使用以下命令:rpm -qa|grep yum
2. 删除已有的yum包。可以使用以下命令:rpm -aq|grep yum|xargs rpm -e --nodeps[2]
3. 下载以下安装包:
- python-2.7.5-89.el7.x86_64.rpm
- python-iniparse-0.4-9.el7.noarch.rpm
- yum-3.4.3-168.el7.centos.noarch.rpm
- yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
- yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm
可以使用以下命令下载这些安装包:wget http://tel.mirrors.163.com/centos/7/os/x86_64/Packages/[包名].rpm
4. 安装下载的安装包。可以使用以下命令:
- rpm -ivh python-2.7.5-89.el7.x86_64.rpm python-iniparse-0.4-9.el7.noarch.rpm --nodeps --force
- rpm -ivh yum-metadata-parser-1.1.4-10.el7.x86_64.rpm --nodeps --force
- rpm -ivh yum-3.4.3-168.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm --nodeps --force
5. 更改yum源。可以根据需要选择合适的yum源进行更改。
这样就完成了在CentOS操作系统下安装yum的过程。请注意,这些步骤需要以管理员权限执行。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [centOS操作系统下如何重装yum](https://blog.csdn.net/zxyhj/article/details/128075045)[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_2"}}] [.reference_item style="max-width: 50%"]
- *2* [Centos下安装yum(完整教程)](https://blog.csdn.net/weixin_45457922/article/details/116430625)[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_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文