Dpkg is a tool for installing, generating, deleting, and managing software packages in Linux. The syntax format is as follows:
Dpkg [option...] action
Dpkg itself is completely controlled by command line parameters. Its command line parameters include one action and zero or multiple options. The action parameter tells dpkg what to do, and the option parameter controls action to some extent. For example, you can use dpkg to check the status of a software package (for example, whether a software package has been installed)
Recommended reading:
Debian software package management tools apt-get and dpkg operation memo
Debian kernel compilation err: line 65 dpkg-gencontrol command not found
The Ubuntu Installation Software prompts "the lock file cannot be opened/var/lib/dpkg/lock ".
Common Parameters for installing Ubuntu dpkg Software
Linux-dpkg software package and APT software package management operations
Apt-get | dpkg | about YUM usage (English)
The command is as follows:
Libtiff4-dev dpkg-s
Shows the query result:
Bkjia @ ubuntu :~ $ Dpkg-s libtiff4-dev
Dpkg-query: package 'lib1_4-dev' is not installed and no information is available
Use dpkg -- info (= dpkg-deb -- info) to check the packaged files,
You can also use dpkg -- contents (= dpkg-deb -- contents) to list their contents.
The query results show that libtiff4-dev packages are not installed in my system.
Of course, you can also use the following command:
Dpkg-query-s libtiff4-dev
Shows the query result:
We can see that the query results of the above two commands are the same (the reason is that the previous command is actually implemented by calling the second command)
To form a comparison, check the next installed software package (for example, libxml2 Software Package) to see what the query results are.
The query command is as follows:
Libtiff4-dev dpkg-s
Shows the command running result:
And the installation is correct.
Sometimes, we need to install a software package (such as a libxml2-dev), but in advance I want to query the specific information about this software package, how to operate?
Method: Use the following command to query
Apt-cache show libxml2-dev
Shows the query result:
The functions listed here are just the tip of the dpkg. For details, you can use the man dpkg command to view them.
This article permanently updates the link address: