看到这个错误很奇怪,不知道怎么回事,经过上网查询发现了是chattr给文件加了i属性问题导致,我之前给/etc/passwd文件加了i属性,在安装这个包时会执行一个脚本创建用户,就会导致脚本执行失败包也安装不上的问题
yum 安装出现错误过程:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
[root@localhost ~]# yum install rpcbind -y Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * epel: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com Resolving Dependencies --> Running transaction check ---> Package rpcbind.x86_64 0:0.2.0-49.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================================================================================================================================================================ Installing: rpcbind x86_64 0.2.0-49.el7 base 60 k Transaction Summary ================================================================================================================================================================================================================================================================================ Install 1 Package Total size: 60 k Installed size: 101 k Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction error: %pre(rpcbind-0.2.0-49.el7.x86_64) scriptlet failed, exit status 1 Error in PREIN scriptlet in rpm package rpcbind-0.2.0-49.el7.x86_64 Verifying : rpcbind-0.2.0-49.el7.x86_64 1/1 Failed: rpcbind.x86_64 0:0.2.0-49.el7 Complete! |
解决:去掉相关文件的i属性,然后再安装就正常了
1 |
chattr -i /etc/passwd |
from:https://wojc.cn/archives/1263.html