yum安装出现error: %pre() scriptlet failed, exit status 1, Error in PREIN scriptlet in rpm package 错误
· 技术积累 · Centos7 Yum

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://me.jinchuang.org/archives/1263.html
本站文章除注明[转载|引用],均为本站原创内容,转载前请注明出处
Centos7 使用strongSwan搭建IKEv2
在Nginx中配置使用Geoip2模块
pip 安装错误 Command "python setup.py egg_info" failed with error code
Centos7 yum报错:Error: rpmdb open failed

Win10 LTSC 2021 添加 连接(投影到此电脑)功能

不允许空 Referer访问,可以使用反向代理解决

我要留言