-bash: yum: command not found 问题解决
来源:互联网 发布:一手数据 编辑:程序博客网 时间:2024/05/01 05:06
操作系统是centos5.6 x86_64,不同的机器已安装的包有所区别,关键是掌握方法。
1下载yum的rpm安装包
[root@localhost rpm]# wget http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/yum-3.2.22-37.el5.centos.noarch.rpm
2 [root@localhost rpm]# rpm -qa | grep yum //确定没有安装yum的rpm包3 [root@localhost rpm]# rpm -ivh yum-3.2.22-37.el5.centos.noarch.rpm
error: Failed dependencies:
yum-fastestmirror is needed by yum-3.2.22-37.el5.centos.noarch
yum-metadata-parser >= 1.1.0 is needed by yum-3.2.22-37.el5.centos.noarch
需要安装依赖的包
4 找第一个依赖
[root@localhost rpm]# wget http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm
5 安装时发现依赖于yum,这个问题可以两个rpm包一起安装解决,先解决第二个依赖
[root@localhost rpm]# rpm -ivh yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm
error: Failed dependencies:yum >= 3.0 is needed by yum-fastestmirror-1.1.16-16.el5.centos.noarch
6 先解决第二个依赖
[root@localhost rpm]# rpm -ivh yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm
error: Failed dependencies:libxml2.so.2()(64bit) is needed by yum-metadata-parser-1.1.2-3.el5.centos.x86_64
7 发现依赖,下载安装
[root@localhost rpm]# wget http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/ libxml2-2.6.26-2.1.12.x86_64.rpm
[root@localhost rpm]# rpm -ivh libxml2-2.6.26-2.1.12.x86_64.rpmPreparing... ########################################### [100%]
1:libxml2 ########################################### [100%]
8 第二个依赖解决,如果还是缺少包,继续下载安装。可以登录http://mirror.centos.org/centos/5.7/os/x86_64/CentOS/ 去找
[root@localhost rpm]# rpm -ivh yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm
Preparing... ########################################### [100%]1:yum-metadata-parser ########################################### [100%]
9 检验一下yum包的依赖情况
[root@localhost rpm]# rpm -ivh yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm
error: Failed dependencies:yum >= 3.0 is needed by yum-fastestmirror-1.1.16-16.el5.centos.noarch
[root@localhost rpm]# rpm -ivh yum-3.2.22-37.el5.centos.noarch.rpm
error: Failed dependencies:
yum-fastestmirror is needed by yum-3.2.22-37.el5.centos.noarch
10 两个一起安装,解决
[root@localhost rpm]# rpm -ivh yum-3.2.22-37.el5.centos.noarch.rpm yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm
Preparing... ########################################### [100%]
1:yum-fastestmirror ########################################### [ 50%]
2:yum ########################################### [100%]
11 有需要可以yum -y update
- -bash: yum: command not found 问题解决
- -bash: yum: command not found 问题解决 .
- -bash: yum: command not found 问题解决
- bash: yum: command not found 问题解决
- -bash yum command not found
- -bash: yum: command not found
- -bash: yum: command not found
- -bash: yum: command not found
- redhat 安装yum教程(解决依赖关系)-bash: yum: command not found 问题解决
- bash: yum install crontabs: command not found
- Linux问题解决:bash,shutdown command not found
- MySQL问题解决:-bash: mysql: command not found
- MySQL问题解决:-bash: mysql: command not found
- bash: ifconfig: command not found 问题解决
- -bash: scp: command not found问题解决
- -bash: scp: command not found问题解决
- bash: ifconfig: command not found 问题解决
- /bin/bash: java: command not found 问题解决
- Html+Javascript+Ajax实现用户登录系统
- Android ListView分页加载数据
- Android最佳性能实践(四)——布局优化技巧
- 20150326
- 美国不应排斥亚投行
- -bash: yum: command not found 问题解决
- Django基本配置
- RPM软件包管理的查询功能
- setup_irq与request_irq的区别
- ubuntu常见错误--could not get lock /var/lib/dpkg/lock -open
- AndroidStudio创建项目时一直处于building“project name”gradle project info的解决办法
- RPG的错排
- redis 入门(一)
- JAVA 开发平台的技术和框架(五)日志管理 :common-logging slf4j log4j logBack