美文网首页
Yum Pending Transaction

Yum Pending Transaction

作者: 海胆阶段 | 来源:发表于2019-03-01 14:10 被阅读0次

    I need to clean yum pending or unfinished transactions before our installer start to work, otherwise the yum update or yum install may fail. But where are these pending transactions from? Sometimes the machine is down or unexpected thing happens, the yum installation process failed.

    Problem

    you may see error like this:

    There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
    The program yum-complete-transaction is found in the yum-utils package.
    
    

    Solution

    According to the prompt, we need first install yum-utils

    yum install -y yum-utils
    

    yum-complete-transaction is a program which finds incomplete or aborted yum transactions on a system and attempts to complete them. It looks at the transaction-all* and transaction-done* files which can normally be found in /var/lib/yum if a yum transaction aborted in the middle of execution.

    If it finds more than one unfinished transaction it will attempt to complete the most recent one first. You can run it more than once to clean up all unfinished transactions.

    Then just issue the following command to do a cleanup:

    yum-complete-transaction --cleanup-only
    

    You can also check how many pending transactions exist:

    find /var/lib/yum -maxdepth 1 -type f -name 'transaction-all*' -not -name '*disabled' -printf . | wc -c
    
    

    相关文章

      网友评论

          本文标题:Yum Pending Transaction

          本文链接:https://www.haomeiwen.com/subject/wndduqtx.html