yum安装包时出现error: %pre() scriptlet failed, exit status 1 和Error in PREIN scriptlet in rpm package 错误
看到这个错误很奇怪,不知道怎么回事,经过上网查询发现了是chattr给文件加了i属性问题导致,我之前给/etc/passwd文件加了i属性,在安装这个包时会执行一个脚本创建用户,就会导致脚本执行失败包也安装不上的问题
yum 安装出现错误过程:
[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属性,然后再安装就正常了
chattr -i /etc/passwd
本文最后记录时间 2022-08-01
文章链接地址:https://wojc.cn/archives/1263.html
本站文章除注明[转载|引用|来源],均为本站原创内容,转载前请注明出处
文章链接地址:https://wojc.cn/archives/1263.html
本站文章除注明[转载|引用|来源],均为本站原创内容,转载前请注明出处