Questions tagged [dpkg]

Dpkg is the Debian package management utility that performs lower-level tasks in software installation and removal. This tag should be used for questions about using and troubleshooting the dpkg utility.

dpkg is a tool to install, build, remove and manage Debian packages. Unlike apt-get, dpkg can be used to install Debian packages off-line.

While the high level APT resolves dependencies and fetches and authenticates packages, dpkg performs low-level tasks involved in package management. For example, when installing a package, dpkg will:

  • unpack the .deb package
  • run the pre-installation script
  • move the files from the package to the correct locations
  • run the post installation script

When asking questions to debug problems with dpkg, please make sure you include the exact command used and the entire output with all error messages. Most of the error messages are generic and non-informative, so the complete output is needed in any attempt to accurately diagnose and solve the problem.

For example, the most common error is

E: Sub-process /usr/bin/dpkg returned an error code (1)

This is very generic and the solution will be different in each case.


Further reading:

The Debian Reference Chapter 2: Package Management

4155 questions
582
votes
12 answers

How to let `dpkg -i` install dependencies for me?

Say, I have foo-1.2.3.deb which depends on perl and python, however, running command: dpkg -i ./foo-1.2.3.deb won't install these dependencies. So I must apt-get install perl python by hand. How to make dpkg -i install these dependencies for me…
Lenik
  • 10,398
109
votes
10 answers

dpkg: error: dpkg status database is locked by another process

I just wondered if somebody could tell me what this means: E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. reidsr@ubuntu:~$ sudo dpkg --configure -a dpkg: error: dpkg status database is locked by…
reidar
  • 1,241
89
votes
3 answers

E: dpkg was interrupted... run 'sudo dpkg --configure -a'

I was running an upgrade with the apt-get command, and it was taking an exceptionally long time because half way through my ISP hit me in the face with their fair usage policy. After sitting outside & watching the rain for awhile my electronics…
77
votes
7 answers

How to resolve "dpkg: error processing /var/cache/apt/archives/python-apport_2.0.1-0ubuntu9_all.deb"?

Update Manager will not update even though I have over 100 updates to install. I get a error message like this: installArchives() failed: Extracting templates from packages: 29%% Extracting templates from packages: 58%% Extracting templates from…
raz7588
  • 771
59
votes
4 answers

dpkg: error: parsing file '/var/lib/dpkg/updates/0045' near line 0:

I am getting this error in Ubuntu 12.04 , while doing the below operation. frank@august:~$ sudo apt-get install ttf-mscorefonts-installer [sudo] password for frank: E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to…
Raja G
  • 102,391
  • 106
  • 255
  • 328
52
votes
2 answers

How force remove when post-installation script always fail

I have a custom package installed on my Ubuntu 10.10, and trying to remove it, I got: $ sudo dpkg -r package sub-process script post-installation installed returne an error state 127 (the message returned from the command was translated from…
40
votes
2 answers

"gzip: stdout: No space left on device" while upgrading the kernel

I see the following error while trying run the command shown below. I read somewhere that my /boot partition is low on disk space. How can I increase the size of the /boot partition so I can install more software? I have a 500GB hard disk, so there…
38
votes
3 answers

How to recover deleted "dpkg" directory?

Unfortunately I've deleted dpkg directory while removing the lock. By mistake I typed root@sam:~$ rm -r /var/lib/dpkg Now when I am trying to install/uninstall packages it shows me following error. E: Could not open lock file /var/lib/dpkg/lock -…
Sambit
  • 1,224
  • 1
  • 10
  • 14
37
votes
6 answers

Errors were encountered while processing: man-db

I get this error when I use apt-get upgrade & apt-get autoremove and on every apt-get [Something].. and when I try to install applications too: Errors were encountered while processing: man-db E: Sub-process /usr/bin/dpkg returned an error code (1)
R9TySix
  • 555
33
votes
4 answers

How to fix "Could not open lock file" because "Permission denied"?

Whenever trying to install any software and update manger, I get an error stating Package operation failed The installation or removal of a software package failed When I run sudo apt-get update I got this result:…
user66498
  • 477
30
votes
3 answers

How to debug dpkg configure error in subprocess post-installation?

In short: I am trying to install spamassassin but dpkg returns only with: dpkg: error processing spamassassin (--configure): subprocess installed post-installation script returned error exit status 1 I have tried to find more information about what…
Requist
  • 2,389
  • 2
  • 22
  • 32
29
votes
1 answer

Will Ubuntu replace dpkg with snappy?

My apologies for being uninformed, but I couldn't find the answer through Google or read/understand a definite answer out of Mark's announcement. Are there plans to replace dpkg in its entirety with the new snappy approach? Or will this feature be…
deucalion
  • 393
29
votes
3 answers

What is dpkg for?

My question is simple -- I want to know more about dpkg -- what does it do?
Raja G
  • 102,391
  • 106
  • 255
  • 328
23
votes
3 answers

How do I force configuration of partially installed packages?

Whenever I run aptitude safe-upgrade, I get this output: The following partially installed packages will be configured: cups gconf2 ufw update-manager No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0…
21
votes
1 answer

dpkg exit with error parsing file `/var/lib/dpkg/status`, what to do?

When I try to install any software, I encounter this error, and therefore I cannot update. Preconfiguring packages ... dpkg: error: parsing file '/var/lib/dpkg/status' near line 51245 package 'oracle-xe': mixed non-coinstallable and coinstallable…
Charindu
  • 211
  • 1
  • 2
  • 3
1
2 3
14 15