[Yum] Force package install using yum?
Michal Domonkos
mdomonko at redhat.com
Wed Jul 1 15:53:02 UTC 2020
On Wed, Jul 1, 2020 at 11:17 AM Jeffrey Walton <noloader at gmail.com> wrote:
>
> Hi Everyone,
>
> I have a CentOS 7 box that's refusing a rpm update. I suspect it has
> something to do with SCL enabled. The 'yum update' output is shown
> below.
>
> I need to force this package to install. I don't give a damn about the
> log files. I need that server patched since it is forward facing.
>
> How do I force the package installation?
>
> Thanks in advance.
>
> ====================
>
> Running transaction
> Updating : httpd24-httpd-2.4.34-18.el7.x86_64 1/2
> Error unpacking rpm package httpd24-httpd-2.4.34-18.el7.x86_64
> error: unpacking of archive failed on file
> /opt/rh/httpd24/root/etc/httpd/logs: cpio: rename
> httpd24-httpd-2.4.34-15.el7.x86_64 was supposed to be removed but is not!
> Verifying : httpd24-httpd-2.4.34-15.el7.x86_64 1/2
> Verifying : httpd24-httpd-2.4.34-18.el7.x86_64 2/2
> Failed:
> httpd24-httpd.x86_64 0:2.4.34-15.el7 httpd24-httpd.x86_64 0:2.4.34-18.el7
You can try using rpm(8) directly to install the package, which allows
for skipping a particular path from the cpio archive; in this case:
# dnf download httpd24-httpd
# rpm -Uhv httpd24-httpd*.rpm --excludepath=/opt/rh/httpd24/root/etc/httpd/logs
I'm not sure if that helps, but it's worth trying.
If it doesn't, you can always forcefully install the package like so:
# rpm --force /path/to/package.rpm
But that's obviously not guaranteed to work (correctly). Then there
are the --no* CLI options to rpm(8) (e.g. --nofiles) which you can try
as well, but I'm not familiar with those very much (yet).
Other than that, this seems like a problem with the package itself, so
if it doesn't "magically" resolve itself after a while (e.g. with the
next httpd24 update), you can always file a bug here:
https://bugzilla.redhat.com/enter_bug.cgi?product=softwarecollections.org
Good luck!
--
Michal Domonkos / RPM Software Engineer & SST Lead / Red Hat, Inc.
More information about the Yum
mailing list