简体   繁体   English

试图删除在 Centos 中受保护的 yum

[英]Trying to remove yum which is protected in Centos

Well, I'm trying to execute the following command.好吧,我正在尝试执行以下命令。

yum remove libffi-3.0.9-1.el5.rf.i386

Because I need that file (?), however facing problems while installing ruby with rvm, as libffi-devel is a dependecy of rvm to install ruby.因为我需要该文件(?),但是在使用 rvm 安装 ruby​​ 时遇到问题,因为 libffi-devel 是 rvm 安装 ruby​​ 的依赖项。

However it gives me the following error, and of course it doesn't delete anything.但是它给了我以下错误,当然它不会删除任何东西。

Error: Trying to remove "yum", which is protected
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

I've already tried with --skip-broken and I get this:我已经尝试过 --skip-broken 并且我得到了这个:

Error: Trying to remove "yum", which is protected
 You could try running: rpm -Va --nofiles --nodigest

As you may see, I'm not an expert in Linux, but I need to install Ruby with rvm and I can't because of this error, does anyone of you have an idea of what am i doing wrong?如您所见,我不是 Linux 专家,但我需要使用 rvm 安装 Ruby,但由于此错误而无法安装,你们中的任何人都知道我做错了什么吗?

Thank you :)谢谢 :)

The right way to do what I was looking for is by doing:做我正在寻找的正确方法是这样做:

rpm -e --nodeps PACKAGE

in the command line.在命令行中。

The command yum remove <package> removes the package as well as any packages that depend on it.命令yum remove <package>删除包以及依赖它的任何包。

In your case, you are trying to remove a package that has many other packages depending on it, including the yum package itself.在您的情况下,您正在尝试删除一个包含许多其他软件包的软件包,包括yum软件包本身。 It is as if you run yum remove yum , which is why you get this error message.就像您运行yum remove yum ,这就是您收到此错误消息的原因。

The command:命令:

rpm -e --nodeps <package>

Can be used to remove a package without removing the packages which depend on it but this will obviously break all these other packages.可用于删除包而不删除依赖于它的包,但这显然会破坏所有其他包。

Installing or removing packages with rpm --nodeps can cause applications to misbehave and/or crash, and can cause serious package management problems or, possibly, system failure.使用 rpm --nodeps 安装或删除软件包可能会导致应用程序行为异常和/或崩溃,并可能导致严重的软件包管理问题,或者可能导致系统故障。

For more details see https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Removing.html有关更多详细信息,请参阅https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Removing.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM