centos7 安装rpm包依赖问题

通常我们安装rpm包时,先cd  xx.rpm进入rpm包目录

然后执行 rpm -ivh xx.rpm

如果没问题那就安装成功了,然而,事情通常都不如我们所愿。

比如:执行命令安装python3.5的时候:

rpm -ivh sclo-python35-python3-py-1.4.34-1.3.el7.noarch.rpm

会报出如下错误:

error: Failed dependencies:
rh-python35-python(abi) = 3.5 is needed by sclo-python35-python3-py-1.4.34-1.3.el7.noarch
rh-python35-python-setuptools is needed by sclo-python35-python3-py-1.4.34-1.3.el7.noarch

rh-python35-runtime is needed by sclo-python35-python3-py-1.4.34-1.3.el7.noarch

除此之外还有很多其他的包也会出现这个问题,那怎么办呢?

经过探索终于发现了解决问题的方法:采用yum的方式安装,yum会自动解决rpm依赖问题

yum install -y sclo-python35-python3-py-1.4.34-1.3.el7.noarch.rpm

结果如下:

Running transaction
  Installing : rh-python35-runtime-2.0-2.el7.x86_64                                                        1/6 
  Installing : rh-python35-python-pip-7.1.0-2.el7.noarch                                                   2/6 
  Installing : rh-python35-python-setuptools-18.0.1-2.el7.noarch                                           3/6 
  Installing : rh-python35-python-3.5.1-11.el7.x86_64                                                      4/6 
  Installing : rh-python35-python-libs-3.5.1-11.el7.x86_64                                                 5/6 
  Installing : sclo-python35-python3-py-1.4.34-1.3.el7.noarch                                              6/6 
  Verifying  : rh-python35-runtime-2.0-2.el7.x86_64                                                        1/6 
  Verifying  : rh-python35-python-pip-7.1.0-2.el7.noarch                                                   2/6 
  Verifying  : rh-python35-python-3.5.1-11.el7.x86_64                                                      3/6 
  Verifying  : rh-python35-python-setuptools-18.0.1-2.el7.noarch                                           4/6 
  Verifying  : rh-python35-python-libs-3.5.1-11.el7.x86_64                                                 5/6 
  Verifying  : sclo-python35-python3-py-1.4.34-1.3.el7.noarch                                              6/6 


Installed:
  sclo-python35-python3-py.noarch 0:1.4.34-1.3.el7                                                             


Dependency Installed:
  rh-python35-python.x86_64 0:3.5.1-11.el7           rh-python35-python-libs.x86_64 0:3.5.1-11.el7             
  rh-python35-python-pip.noarch 0:7.1.0-2.el7        rh-python35-python-setuptools.noarch 0:18.0.1-2.el7       
  rh-python35-runtime.x86_64 0:2.0-2.el7          

Complete!


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值