在 CentOS7 上使用 Yum 删除软件包时遇到问题

在 CentOS7 上使用 Yum 删除软件包时遇到问题

问题:从系统和 Yum 中删除 python-boto。它似乎不再安装,但仍出现在 Yum 中。

尝试过:yum clean all;yum check;rpm -e --noscripts python-boto 和 rpm -e --noscripts python-boto.noarch 但尚未解决。使用 find 检查软件包是否出现在那里。请参阅下文了解每个软件包的详细结果。

问题:我还能尝试什么?尝试有什么风险

# yum list | grep boto
python-boto.noarch                      2.25.0-2.el7.centos             extras
python-boto3.noarch                     1.4.6-5.el7                     base
python2-XStatic-roboto-fontface.noarch  0.4.3.2-4.el7                   epel
python2-boto.noarch                     2.45.0-3.el7                    epel
python2-boto3.noarch                    1.4.6-1.el7                     epel
python2-botocore.noarch                 1.6.0-1.el7                     epel


# yum remove python-boto
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-
              : manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
No Match for argument: python-boto
No Packages marked for removal


# yum clean all --verbose
Loading "fastestmirror" plugin
Loading "product-id" plugin
Loading "search-disabled-repos" plugin
Loading "subscription-manager" plugin
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Config time: 0.074
Yum version: 3.4.3
Cleaning repos: base epel extras mariadb nodesource openproject-ce remi
              : remi-php56 remi-php73 remi-safe updates
Operating on /var/cache/yum/x86_64/7 (see CLEAN OPTIONS in yum(8) for details)
Disk usage of /var/cache/yum/*/* after cleanup:
0      enabled repos
16 M   disabled repos:
  16 M   /var/cache/yum/x86_64/7/centosplus
0      untracked repos
628    other data:
  628    /var/cache/yum/x86_64/7/timedhosts
16 M   total


# yum list | grep boto
python-boto.noarch                      2.25.0-2.el7.centos             extras
python-boto3.noarch                     1.4.6-5.el7                     base
python2-XStatic-roboto-fontface.noarch  0.4.3.2-4.el7                   epel
python2-boto.noarch                     2.45.0-3.el7                    epel
python2-boto3.noarch                    1.4.6-1.el7                     epel
python2-botocore.noarch                 1.6.0-1.el7                     epel


# yum check
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-
              : manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
check all


# yum list | grep boto
python-boto.noarch                      2.25.0-2.el7.centos             extras
python-boto3.noarch                     1.4.6-5.el7                     base
python2-XStatic-roboto-fontface.noarch  0.4.3.2-4.el7                   epel
python2-boto.noarch                     2.45.0-3.el7                    epel
python2-boto3.noarch                    1.4.6-1.el7                     epel
python2-botocore.noarch                 1.6.0-1.el7                     epel


# yum remove python-boto
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-
              : manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
No Match for argument: python-boto
No Packages marked for removal


# find / -name *boto* -print
/usr/lib/python2.7/site-packages/boto3
/usr/lib/python2.7/site-packages/botocore
/usr/lib/python2.7/site-packages/botocore-1.12.134.dist-info
/usr/lib/python2.7/site-packages/boto3-1.9.134.dist-info

# rpm -e python-boto
error: package python-boto is not installed
# rpm -e --noscrips python-boto
rpm: --noscrips: unknown option
# rpm -e --noscripts python-boto
error: package python-boto is not installed
# rpm -e --noscripts python-boto.noarch
error: package python-boto.noarch is not installed

非常感谢您的帮助。

答案1

该包根本没有安装。

yum list列表全部可用的软件包,无论是否安装。

要仅显示已安装的包,请使用yum list installed

yum list installed | grep boto

答案2

在基于 rpm 的发行版中查找已安装软件包的另一种方法是rpm -qa|grep,因此首先确保包已安装,如果已安装,您可以从任一位置删除包rpm -e或使用yum 删除。希望对你有帮助。

答案3

假设文件来自另一个包我会尝试:

yum whatprovides /usr/lib/python2.7/site-packages/boto3-1.9.134.dist-info

找到包含该文件的包,或者rpm -qf /path/to/file

相关内容