Error when patching the system "error: unpacking of archive failed on file /var/log/audit: cpio: lsetfilecon"
Issue
Error when upgrading the auditd package this error was seen:
error: unpacking of archive failed on file /var/log/audit: cpio: lsetfilecon
Full Log:
Dependencies Resolved
===============================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================
Updating:
audit x86_64 2.6.5-3.el7 rhel-7-server-rpms 233 k
Transaction Summary
===============================================================================================================================
Upgrade 1 Package
Total download size: 233 k
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
audit-2.6.5-3.el7.x86_64.rpm | 233 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : audit-2.6.5-3.el7.x86_64 1/2
Error unpacking rpm package audit-2.6.5-3.el7.x86_64
warning: /etc/audisp/plugins.d/syslog.conf created as /etc/audisp/plugins.d/syslog.conf.rpmnew
warning: /etc/audit/auditd.conf created as /etc/audit/auditd.conf.rpmnew
error: unpacking of archive failed on file /var/log/audit: cpio: lsetfilecon
audit-2.4.1-5.el7.x86_64 was supposed to be removed but is not!
Verifying : audit-2.4.1-5.el7.x86_64 1/2
Verifying : audit-2.6.5-3.el7.x86_64 2/2
Failed:
audit.x86_64 0:2.4.1-5.el7 audit.x86_64 0:2.6.5-3.el7
Complete!
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.