can not install software in linux error as dpkg was interrupted

后端 未结 5 801
感情败类
感情败类 2021-02-08 23:06

I was trying to install mono using following commands,

  1. sudo apt-get install mono-*

unfortunately, I closed the terminal while it instal

相关标签:
5条回答
  • 2021-02-08 23:34

    run the command sudo dpkg --configure -a

    0 讨论(0)
  • 2021-02-08 23:36

    next time please don't use

    sudo rm /var/lib/apt/lists/lock
    sudo rm /var/cache/apt/archives/lock
    

    or anything like that. Decent way to do this is

    sudo killall apt-get
    
    0 讨论(0)
  • 2021-02-08 23:52

    After searching a lot I got a satisfactory result:

    I found some places saying to run commands:

    sudo apt-get install -f
    sudo dpkg --configure -a 
    

    But none of those above worked.

    The solution that worked to me:

    sudo dpkg --configure --pending
    

    I hope this helps

    0 讨论(0)
  • 2021-02-08 23:53

    This error occurs when u stop the any installation in-between either using terminal or Ubuntu app center. This can be solved by removing the broken installation. To do so enter the following command in the terminal in the same order.

    cd /var/lib/dpkg/updates
    sudo rm *
    sudo apt-get update
    
    0 讨论(0)
  • 2021-02-08 23:54

    you can also try to update your ubuntu by command :

    sudo apt-get update && sudo apt-get upgrade
    

    Sometime the dpkg needs some update to fix this problem.

    0 讨论(0)
提交回复
热议问题