【问题标题】:How to uninstall RPM without dependencies error in cent os?如何在centos中卸载没有依赖错误的RPM?
【发布时间】:2018-01-23 13:12:03
【问题描述】:

很久以前我安装了 openssl rpm。之后我无法卸载 rpm,因此我手动删除了 /usr/bin/openssl 文件夹。虽然我手动删除了它,但当我使用此命令 rpm -qa openssl grep 时,我可以找到 rpm。 但是当我在终端中执行 openssl 命令时,它显示 bash:openssl: command not found...

尝试卸载时出现以下错误

[root@genius ~]# rpm -qa openssl
openssl-1.0.2k-8.el7.x86_64

[root@genius ~]# rpm -e openssl-1.0.2k-8.el7.x86_64
error: Failed dependencies:
    /usr/bin/openssl is needed by (installed) authconfig-6.2.8-30.el7.x86_64

当我尝试安装 rpm 时,它显示以下输出

[root@genius openssl]# rpm -ivh openssl-1.0.2k-8.el7.x86_64.rpm
Preparing...    ################################# [100%]
        package openssl-1:1.0.2k-8.el7.x86_64 is **already installed**

最后, 我需要将 openssl 包安装在我的 centOS 7 中,否则我需要完全删除 openssl 包没有任何依赖项错误。

【问题讨论】:

  • 您要安装还是删除openssl?我没听懂。

标签: linux openssl centos7 rpm


【解决方案1】:

你有几个选择:

1. Remove using yum, Note: this may remove the dependency such as authconfig
$ yum remove openssl

2. Remove using rpm cmdline, but you have to force remove it. This will not remove the depencies
$ rpm -e openssl-1.0.2k-8.el7.x86_64 --nodeps

3. or try a reinstall if you have CentOS-7 repo
$ yum reinstall openssl

如果你想在你的系统中使用openssl,我会先尝试(3)。如果这不起作用,请尝试 (2),然后执行 yum install openssl。 (3) 和 (1) 是要使用的选项。 (2)会导致依赖包留在系统中,依赖包可能会出现故障。

【讨论】:

    猜你喜欢
    • 2016-12-07
    • 1970-01-01
    • 2015-10-14
    • 1970-01-01
    • 2020-06-03
    • 2014-12-25
    • 1970-01-01
    • 2013-07-20
    • 1970-01-01
    相关资源
    最近更新 更多