SOLVED Getting this message while performing yum update/upgrade

schatzman

Member
Apr 9, 2017
23
2
3
europe
cPanel Access Level
Website Owner
hello

while trying to execute yum update or yum upgrade the following failed message appear:

Error unpacking rpm package binutils-2.20.51.0.2-5.46.el6.x86_64
error: unpacking of archive failed on file /usr/bin/ld: cpio: rename failed - Operation not permitted
binutils-2.20.51.0.2-5.44.el6.x86_64 was supposed to be removed but is not!
There were non-fatal errors in the transaction

how to fix this issue?

thank you
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
error: unpacking of archive failed on file /usr/bin/ld: cpio: rename failed - Operation not permitted
Hello,

Is SELinux enabled on this system? You can check with a command such as:

Code:
getenforce
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello,

It looks like the permissions or attributes on the file are preventing it from running on the system. Check to see if the file is using the immutable attribute by first seeing where that file links to with a command such as:

Code:
ls -al /usr/bin/ld
For instance, on a test system running CentOS 7, I see this output:

Code:
# ls -al /usr/bin/ld
lrwxrwxrwx 1 root root 20 Feb 20 22:44 /usr/bin/ld -> /etc/alternatives/ld
Thus, I'd keep checking until I get that actual file path:

Code:
# ls -al /etc/alternatives/ld
lrwxrwxrwx 1 root root 15 Feb 20 22:44 /etc/alternatives/ld -> /usr/bin/ld.bfd
Then, I'd run:

Code:
stat /usr/bin/ld.bfd
lsattr /usr/bin/ld.bfd
These commands will vary depending on your system, but you essentially want what's causing the update operation to fail.

Thank you.
 

schatzman

Member
Apr 9, 2017
23
2
3
europe
cPanel Access Level
Website Owner
Hello,

It looks like the permissions or attributes on the file are preventing it from running on the system. Check to see if the file is using the immutable attribute by first seeing where that file links to with a command such as:

Code:
ls -al /usr/bin/ld
For instance, on a test system running CentOS 7, I see this output:

Code:
# ls -al /usr/bin/ld
lrwxrwxrwx 1 root root 20 Feb 20 22:44 /usr/bin/ld -> /etc/alternatives/ld
Thus, I'd keep checking until I get that actual file path:

Code:
# ls -al /etc/alternatives/ld
lrwxrwxrwx 1 root root 15 Feb 20 22:44 /etc/alternatives/ld -> /usr/bin/ld.bfd
Then, I'd run:

Code:
stat /usr/bin/ld.bfd
lsattr /usr/bin/ld.bfd
These commands will vary depending on your system, but you essentially want what's causing the update operation to fail.

Thank you.
ok, tried to execute it but getting some different output, attached is a screen shot..

thanks
 

Attachments

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello,

Post the output from this command:

Code:
lsattr /usr/bin/ld
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
sure,
this is: ----i--------e- /usr/bin/ld
You can try removing the immutable attribute to see if that allows YUM to proceed. EX:

Code:
chattr -i /usr/bin/ld
Thank you.