[root@NFS ~]# yum install rpcbind -y Loaded plugins: fastestmirror, security Setting up Install Process Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com Resolving Dependencies --> Running transaction check ---> Package rpcbind.x86_64 0:0.2.0-12.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================== Package Arch Version Repository Size ================================================================================================================================== Installing: rpcbind x86_64 0.2.0-12.el6 base 51 k Transaction Summary ================================================================================================================================== Install 1 Package(s) Total download size: 51 k Installed size: 95 k Downloading Packages: rpcbind-0.2.0-12.el6.x86_64.rpm | 51 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction error: %pre(rpcbind-0.2.0-12.el6.x86_64) scriptlet failed, exit status 6 Error in PREIN scriptlet in rpm package rpcbind-0.2.0-12.el6.x86_64 error: install: %pre scriptlet failed (2), skipping rpcbind-0.2.0-12.el6 Verifying : rpcbind-0.2.0-12.el6.x86_64 1/1 Failed: rpcbind.x86_64 0:0.2.0-12.el6 Complete!
后来发现是因为通过chattr +i 把/etc/passwd /etc/group /etc/shadow /etc/gshadow锁定了。
解锁后,问题解决。
其实在RPCBIND和NFS-UTILS安装的时候会自动的创建一些用户
rpcbind | rpc |
rpcuser | |
nfs-utils | nfsnobody |
所以在安装的时候,需要确保root用户对/etc/passwd /etc/group /etc/shadow /etc/gshadow文件有权限并且这些文件可以修改。