首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么rpm告诉我包是安装的,而不是安装的?

为什么rpm告诉我包是安装的,而不是安装的?
EN

Stack Overflow用户
提问于 2016-03-09 07:06:33
回答 1查看 1.7K关注 0票数 1

我想卸载,但是rpm告诉我包没有安装。

代码语言:javascript
复制
# rpm -e *.rpm
error: package ansible-2.0.1.0-2.el6.noarch.rpm is not installed
error: package libyaml-0.1.3-4.el6_6.x86_64.rpm is not installed
error: package python-babel-0.9.4-5.1.el6.noarch.rpm is not installed
error: package python-crypto-2.0.1-22.el6.x86_64.rpm is not installed
error: package python-crypto2.6-2.6.1-2.el6.x86_64.rpm is not installed
error: package python-httplib2-0.7.7-1.el6.noarch.rpm is not installed
error: package python-jinja2-2.2.1-2.el6_5.x86_64.rpm is not installed
error: package python-jinja2-26-2.6-3.el6.noarch.rpm is not installed
error: package python-keyczar-0.71c-1.el6.noarch.rpm is not installed
error: package python-markupsafe-0.9.2-4.el6.x86_64.rpm is not installed
error: package python-paramiko-1.7.5-2.1.el6.noarch.rpm is not installed
error: package python-pyasn1-0.0.12a-1.el6.noarch.rpm is not installed
error: package python-setuptools-0.6.10-3.el6.noarch.rpm is not installed
error: package python-simplejson-2.0.9-3.1.el6.x86_64.rpm is not installed
error: package python-six-1.9.0-2.el6.noarch.rpm is not installed
error: package PyYAML-3.10-3.1.el6.x86_64.rpm is not installed
error: package sshpass-1.05-1.el6.x86_64.rpm is not installed

但是当我试图安装

代码语言:javascript
复制
# rpm -i *.rpm
    package python-crypto-2.0.1-22.el6.x86_64 is already installed
    package python-babel-0.9.4-5.1.el6.noarch is already installed
    package python-paramiko-1.7.5-2.1.el6.noarch is already installed
    package sshpass-1.05-1.el6.x86_64 is already installed
    package python-simplejson-2.0.9-3.1.el6.x86_64 is already installed
    package python-setuptools-0.6.10-3.el6.noarch is already installed
    package python-pyasn1-0.0.12a-1.el6.noarch is already installed
    package python-keyczar-0.71c-1.el6.noarch is already installed
    package python-httplib2-0.7.7-1.el6.noarch is already installed
    package python-crypto2.6-2.6.1-2.el6.x86_64 is already installed
    package libyaml-0.1.3-4.el6_6.x86_64 is already installed
    package PyYAML-3.10-3.1.el6.x86_64 is already installed
    package python-jinja2-2.2.1-2.el6_5.x86_64 is already installed

但是没有安装结果。

代码语言:javascript
复制
# ansible
bash: ansible: command not found

为什么?我已经下载了所有依赖项,请尝试脱机安装ansible。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-03-09 12:47:19

清华的用途是:

代码语言:javascript
复制
rpm -e PACKAGE_NAME

因此

代码语言:javascript
复制
rpm -e ansible

而不是:

代码语言:javascript
复制
rpm -e ansible-2.0.1.0-2.el6.noarch.rpm

而且rpm -i的语法确实是带有文件名的,但是如果已经安装了一些文件名,它就拒绝安装更新版本。您应该调用rpm -U,因此:

代码语言:javascript
复制
rpm -Uvh *.rpm

顺便说一句:如果您只想在EL6上使用最新的ansible,那么您可以使用这个存储库:https://copr.fedorainfracloud.org/coprs/toshio/ansible-upstream/

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35885122

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档