Debian dpkg Command Parsing-Linux Release Technology-Debian information, the following is a detailed description. Dpkg is the Debian intermediate Software Package Manager, similar to RPM.
Dpkg is the mainstay of the Debian software package management system. It is responsible for safely uninstalling software packages, configuring and maintaining installed software packages. It is also the backend of many software package management tools in the Debian system.
All packages in the system are stored in the/var/lib/dpkg/directory. The subdirectory "/var/lib/dpkg/info" is used to save the configuration file list of each software package.
. Conffiles records the configuration file list of the software package.
. List stores the file list in the software package. You can find the specific installation location of the file in the software package from the. list information.
. Md5sums records the md5 information of the software package. This information is used for package verification.
The. prerm script runs before the Debian report package. The main function is to stop the service acting on the package to be upgraded until the package is installed or upgraded.
The. postinst script is used to complete the configuration after the Debian package is unbundled. It is usually used to execute commands related to the Installed Package and restart the service.
The/var/lib/dpkg/available file contains the description of the software package, which includes all the software packages in the Debian installation source used by the current system, these include installed and uninstalled software packages in the current system.
Dpkg
Query Information for Installation
Query all deb packages installed in the current system
Dpkg? The l command is used to query information about all deb packages installed in the current system. You can perform more complex queries through less and grep.
For example, find the vim-related software package, dpkg? L | grep? Ivim
(If iU is found, the software package is not successfully installed, and ii indicates that the installation is successful)
View Details of installed software packages
Dpkg? The s command is used to view the details of the software package, including the version and dependency.
File installed by the software package installed in the query system
Dpkg? L command is used to query the installation files of the software packages installed in the system and the installed files.
TIPS: How can I check where the software is packaged?
Use apt-get install *
How can we see where the software is packaged?
Dpkg-L package-name | more
Which package does a file belong to in the query system?
Dpkg? The S command is used to understand which software package the current software belongs.
Query uninstalled Information
Query details of uninstalled software packages
Dpkg? The I command is used to view the details of a software package that is not installed, so that you can see whether the software package needs to be installed.
Query the files contained in the deb package file
Dpkg? C. display the list of files not included in the deb package installed and the installation location
Install software package
Install deb Software Package
Dpkg? I manually install the deb package to the system, but sometimes the Dpends relationship exists. We recommend that you use apt-get to install the package.
If you use dpkg? After I install the software, the software is not successfully installed due to the relationship between Dpends. You can use apt-get? F install Solution
Solve dpkg? I have a Dpends problem when installing the deb package.
Apt-get? F install to solve the Dpends problem.
Example: dpkg? I lftp_3.1.3-1_i386.deb
Selecting previusly deselected package lftp.
(Reading database... 20654 files and directories currently installed .)
Unpacking lftp (from lftp_3.1.3-1_i386.deb )...
Dpkg: dependency problems prevent configuration of lftp:
Ftp depends on libexpat1 (<= 1.95.8); however
Dpkg: error processing lftp (-- install)
Dependency problems? Leaving unconfigured
Errors were encountered while processing:
Lftp
// Lftp package installation failed
Dpkg? L | grep lftp
IU lftp 3.1.3-1 Sophisticated
Command-line FTP/HTTP client p
// "Dpkg-l" indicates that the lftp package is not successfully installed.
(IU indicates that the installation is not successful, ii indicates that the installation is successful)
Use apt-get? F install Solution
Uninstall deb Software Package
Uninstall deb package
Dpkg? R is used to uninstall a specified software package. This command only uninstalls the software package and installs it in the system. It does not delete the configuration file of the software package. Therefore, it is not completely uninstalled. however, the software package is stored in the system and can be provided for later use when installing the software package.
Example: dpkg? R prozilla removed and then used dpkg? L | grep prozilla View
The rc proc 1.3.6-3woody3 multi-thraded download accelerator is displayed.
Indicates that the package has been uninstalled, but the configuration file is still in the "rc" Table configuration file.
Uninstall the software package and clear the configuration file
Dpkg? P is used to uninstall the software package and delete the configuration file, dpkg? P cannot solve the Dpends problem. We recommend that you use apt-get during uninstallation.
Reconfigure the Software Package
For many software packages (especially system and server software packages) in the Debian system, a dialog box is displayed when the software package is installed for the first time, prompting you to enter necessary configuration information. when you need to configure the software package again, you can use dpkg-reconfigure to configure the specified software package.
For example, dpkg-reconfigure locales
Configuration language
Alien package Conversion Tool
If we have a favorite RPM package and no deb version
What should I do ~?
It can be converted or directly installed through alien. This little guy is very convenient!
The basic commands are as follows:
First install alien through apt-get install.
Then alien-I name-of-the-pakage.rpm/* is used to directly install the rpm package
Alien-d, -- to-deb/* Make debian packages, This is the default
Example: alien? D package. rpm
Alien? R, -- to-rpm/* Make rpm packages
Example: alien? R package. deb
Alien? P, -- to-pkg/* Make Solaris pkg packages
Alien? -To-slp/* Make slp packages
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.