【问题标题】:Why rpm told me the package is installed and not installed?为什么rpm告诉我软件包已安装而未安装?
【发布时间】:2016-03-09 20:47:19
【问题描述】:

我想卸载,但 rpm 告诉我该软件包没有安装

# 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

但是当我尝试安装时

# 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

但是结果没有安装

# ansible
bash: ansible: command not found

为什么?我已经下载了所有依赖,尝试离线安装ansible。

【问题讨论】:

    标签: centos ansible rpm


    【解决方案1】:

    周四的用法是:

    rpm -e PACKAGE_NAME
    

    因此

    rpm -e ansible
    

    而不是:

    rpm -e ansible-2.0.1.0-2.el6.noarch.rpm
    

    rpm -i 的语法确实是文件名,但是如果已经安装了新版本,它会拒绝安装。你应该打电话给rpm -U,所以:

    rpm -Uvh *.rpm
    

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

    【讨论】:

      猜你喜欢
      • 2020-12-02
      • 1970-01-01
      • 1970-01-01
      • 2019-06-28
      • 1970-01-01
      • 1970-01-01
      • 2019-10-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多