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 this file (?), However, problems arise before installing ruby ​​with rvm, since libffi-devel is a dependency on rvm for installing ruby.

However, it gives me the following error and, of course, does not 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 already tried with -skip-broken and I get the following:

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

As you can see, I am not an expert on Linux, but I need to install Ruby with rvm, and I cannot because of this error, do any of you have an idea about what I'm doing wrong?

Thanks:)

+4
source share
2 answers

The correct way to do what I was looking for is to do:

 rpm -e --nodeps PACKAGE 

on the command line.

+7
source

Command:

 yum remove <package> 

Will try to remove the package, as well as any packages that depend on it.

In your case, you are trying to remove a package, while there are many other packages that depend on it, including the yum package itself. This is similar to running yum remove yum , so you get this error message.

Command:

 rpm -e --nodeps <package> 

It can be used to remove a package without removing packages that depend on it , but this will obviously break all these other packages.

Installing or removing packages with rpm --nodeps can lead to application malfunction and / or crashes and can cause serious package management problems or, possibly, a system crash.

See https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Removing.html for details

+4
source

All Articles