zoukankan      html  css  js  c++  java
  • Red Hat 操作系统 rpm 卸载软件提示"error: %preun( ) scriptlet failed, exit status 1"

    在linux里安装程序有两种方法,一种是源程序安装,按照安装包里的readme或者install文件指示,一步步地进行,通常是configure,
    make, install三部曲。另一种就是rpm包,这个类似windows里常见的安装程序,既可在xwin里双击运行,也可以在终端里输入
    rpm -ivh packagename开始安装。

    卸装时,用源程序安装的运行make uninstall, 用rpm安装的则仍是使用rpm。

    对于接触linux不久的我来说,总感觉这些过程挺麻烦的,时不时会遇到点问题。

    今天卸载rpm的时候,就出了一点岔子,记录下来以为后鉴。

    提示错误"error: %preun(wine-20050310-1fc1winehq) scriptlet failed, exit status 1”
    

    经搜索,其解决方法为加 --noscripts 标记来删除RPM。 --noscripts 相当于 --nopre --nopost
    --nopreun --nopostun。

    即卸载命令变为:

    $rpm -e --noscripts wine-20050310-1fc1winehq
    

    若要查看与RPM关联的scripts,使用--script查询RPM包。

    $rpm -q --scripts package
    

    卸载时,若系统里有同一程序的多个安装版本要一起删除,可使用--allmatches标记,如

    $ rpm -e --noscripts --allmatches vsftpd
    

    卸载成功后,重新安装新的wine包 $rpm -ivh vsftpd-2.3.4-5.1.3.x86_64rpm.

    参考资料:
    https://rpmfind.net/linux/rpm2html/
    https://techmesrv.weebly.com/yum-errors/yum-package-removal-error-error-in-preun-scriptlet-in-rpm-package

  • 相关阅读:
    4.23上机练习
    4.17java作业
    4.16java作业
    leetcode 189
    leetcode 172
    leetcode 171
    leetcode 169
    win10内网外网智能访问
    leetcode 168
    leetcode 165
  • 原文地址:https://www.cnblogs.com/linuxChina/p/11236665.html
Copyright © 2011-2022 走看看