Questions tagged [dpkg]

Questions about using dpkg or errors with dpkg should use this tag. Dpkg is the Debian package management utility that performs lower-level tasks in software installation and removal.

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

3918 questions
25 answers

Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

I get this error when trying to use apt-get: E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it? How can I fix this?
La Ode Adam Saputra
  • 11,833
  • 3
  • 15
  • 8
6 answers

How do I get a list of installed files from a package?

I want to know where I can find my installed application when I installed it on Ubuntu using package manager. I installed RabbitMQ and ran locate rabbitmq which gave me following…
Anupam Gupta
  • 5,413
  • 3
  • 7
  • 6
11 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…
Xiè Jìléi
  • 9,698
  • 12
  • 32
  • 36
2 answers

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

I'm trying to run this command in the terminal: sudo apt install software-properties-common This is the error message I get: E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) E: Unable to acquire the…
  • 2,241
  • 2
  • 6
  • 3
6 answers

Installed Teamviewer using a 64-bit system, but I get a dependency error

I was trying to install Teamviewer, but I was getting a dependency error. I tried to install the required packages, but with no luck. I'm getting this error: Unpacking teamviewer (from teamviewer_linux_x64.deb) ... dpkg: dependency problems prevent…
Mini John
  • 2,335
  • 2
  • 13
  • 12
3 answers

How do I get details about a package which isn't installed?

How can I get some details about a package without installing it, (eg. the description and version number) like in Synaptic or Aptitude. The command dpkg -s PACKAGE does not work, with this error. It works for installed packages,…
  • 26,508
  • 16
  • 77
  • 115
5 answers

dpkg error: "trying to overwrite file, which is also in..."

For example: $ sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: bsh :…
  • 2,289
  • 4
  • 19
  • 23
4 answers

What is the difference between dpkg and aptitude/apt-get?

When installing a software via dpkg -i packageA.deb, will the dependencies required by packageA be downloaded and installed automatically? How is this different from using apt-get or aptitude?
Aniket Thakur
  • 4,147
  • 3
  • 24
  • 24
4 answers

What do the various dpkg flags like 'ii' 'rc' mean?

I frequently need to check which packages are installed, and I use the following command: dpkg -l | grep foo which gives the following output Desired=Unknown/Install/Remove/Purge/Hold |…
  • 15,495
  • 22
  • 70
  • 90
12 answers

Is it possible to install a .deb from a URL?

Is there a way to install a deb package directly from a URL, using a shell? Something like dpkg -i (I know I could use wget and then dpkg, I'm just wondering if there's something that does it already)
  • 2,179
  • 6
  • 27
  • 29
6 answers

How can I find the version number of an installed package via dpkg?

I use the dpkg -l command to find out what version of a package I have installed. For example: dpkg -l network-manager returns the information on the package: Desired=Unknown/Install/Remove/Purge/Hold |…
Jorge Castro
  • 69,284
  • 123
  • 459
  • 651
8 answers

How to remove/install a package that is not fully installed?

I went to install bsnes the other day and, for whatever reason, the installation failed. Now, I cannot update, install new packages, or do basically any apt-get commands as they all try to process this broken package and fail. Attempting to install…
  • 1,481
  • 2
  • 11
  • 7
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…
  • 1,151
  • 3
  • 9
  • 7
2 answers

Can not install 'openjdk-9-jdk' because it tries to overwrite file aready included in 'openjdk-9-jdk-headless'

I'm running Ubuntu 16.04 Xenial desktop, 64 bit, and wanted to install openjdk-9-jdk (Java 9 development kit). The version available from the universe repository is 9~b114-0ubuntu1. Running the installation command successfully installs the…
Byte Commander
  • 101,912
  • 42
  • 275
  • 416
2 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…
Hunter Burnette
  • 791
  • 1
  • 6
  • 3
2 3
99 100