Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can not install software in linux error as dpkg was interrupted [closed]

Tags:

linux

mono

ubuntu

I was trying to install mono using following commands,

  1. sudo apt-get install mono-*

unfortunately, I closed the terminal while it installing. again i started to reinstall but shown error like

Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)

I tried below commands for solution,

  1. sudo rm /var/lib/apt/lists/lock
  2. sudo rm /var/cache/apt/archives/lock

But now I am getting the error like

dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

how do I fix this one?

like image 246
MMMMS Avatar asked Sep 08 '14 12:09

MMMMS


People also ask

What to do when dpkg was interrupted?

How to fix “dpkg was interrupted, you must manually run sudo dpkg –configure -a to correct the problem” error. Whether you are a beginner or a pro, if you have been using Linux or Nginx for WordPress then it may be common to see the error when you try to install apt-get or using apt or doing just a Yum Update.

Why is dpkg not working?

The dpkg error message indicates that there is a problem with the package installer, which is commonly caused by an interrupted installation process or a corrupted database.

What is dpkg error Linux?

The error can be caused by multiple reasons. You might have lost your internet connection, the package being installed was corrupted, or another issue you can't point out. The problem with not knowing why the error occurred is that you can't solve the issue straight away.


2 Answers

This error occurs when you stop any installation while it's in progress. Regardless of whether you are using the terminal or the Ubuntu app center, the error will still be generated.

You can solve this by removing the broken installation. To do so, enter the following commands in the terminal in the order they are written.

   cd /var/lib/dpkg/updates
   sudo rm *
   sudo apt-get update
like image 123
ram Avatar answered Oct 14 '22 16:10

ram


run the command sudo dpkg --configure -a

like image 36
maskacovnik Avatar answered Oct 14 '22 15:10

maskacovnik