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

4252 questions
1174
votes
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?
602
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,628
572
votes
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 result: /home/anupamg/.m2/repository/com/rabbitmq…
Anupam Gupta
  • 5,843
296
votes
6 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…
GoodNite
  • 2,961
  • 2
  • 9
  • 3
224
votes
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,345
  • 2
  • 15
  • 12
213
votes
6 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 :…
204
votes
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, though dpkg-query:…
kiri
  • 29,066
158
votes
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 |…
theTuxRacer
  • 16,543
156
votes
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 ?
125
votes
13 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 http://domain.com/path/to/package.deb (I know I could use wget and then dpkg, I'm just wondering if there's something that does it already)
Joril
  • 2,433
125
votes
11 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…
Bijak
  • 1,679
120
votes
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
  • 73,907
111
votes
2 answers

dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

On Ubuntu 18.04 I am getting this when I want to install the recommended Nvidia driver. sudo apt install nvidia-340 Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically…
110
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,251
97
votes
7 answers

Pregenerating ConTeXt MarkIV format. This may take some time... takes forever

Hey there I tried to install latex using the follwing commands in ubuntu 16.04: sudo apt-get install texlive-full texstudio Then I finally came to the point with the following output: Setting up thunderbird-locale-en…
sqp_125
  • 1,151
1
2 3
99 100