音乐分享(自动连播):
So cold
Not my baby
Wicked Game
What Is Love
Once Upon a Time
The Heart Of The Ocean
靳闯博客 记录是一种习惯 、分享是一种态度
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

本站文章除注明[转载|引用|原文]出处外,均为本站原生内容,转载前请注明出处 | 文章链接地址:https://me.jinchuang.org/archives/1263.html

如果这篇文章帮助到了你,我感到十分荣幸!

记录 🐾 分享 👣 进步 💪 变强


留言

顶部