RPM删除包的时候报127错误

装了一个LDAPserver,然后我没有用rpm -e这样的命令来删除这个软件,而是自行调用了./uninstall来做删除,可当我自认为删除成功的时候, 再次安装却出现了错误,

[root@cheetah package]# rpm -i redhat-ds-7.1SP3-5.RHEL4.i386_LDAP.rpm
warning: redhat-ds-7.1SP3-5.RHEL4.i386_LDAP.rpm: V3 DSA signature: NOKEY, key ID db42a60e
        package redhat-ds-7.1SP3-5.RHEL4 is already installed

有点傻眼了,看来只能调用rpm -e来删,我赶紧调用rpm -e命令

[root@cheetah package]# rpm -qa | grep redhat-ds-7.1SP3-5.RHEL4
redhat-ds-7.1SP3-5.RHEL4
[root@cheetah package]# rpm -e redhat-ds-7.1SP3-5.RHEL4
/var/tmp/rpm-tmp.99459: line 6: cd: /opt/redhat-ds: No such file or directory
/var/tmp/rpm-tmp.99459: line 7: ./uninstall: No such file or directory
error: %preun(redhat-ds-7.1SP3-5.RHEL4.i386) scriptlet failed, exit status 127

出错了,找不到文件,因为我已经都删除了。

要删除掉这个软件的注册信息,找了下文章,是调用rpm -e xxxx --noscript,果然就好了。

原文地址:https://www.cnblogs.com/hashmap/p/2162424.html