Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
dpkg [2018/02/22 15:43]
yassine chaouche
dpkg [2018/02/22 15:49] (current)
yassine chaouche
Line 6: Line 6:
   - How do you [[dpkgfindpackageoffile|know to which package a particular file belongs to]] ?    - How do you [[dpkgfindpackageoffile|know to which package a particular file belongs to]] ? 
   - How do you [[dpkgqueryinstalled|know if a package is installed or not]] ?   - How do you [[dpkgqueryinstalled|know if a package is installed or not]] ?
- 
-==== Listing files installed by a package ==== 
- 
-dpkg -L packagename , this is useful in case you installed a software and don't find the binaries. Maybe they are installed in a directory outside of your PATH, or they don't have the name you expected them to. 
  
 ==== You are searching for a file and wonder what package provides it ==== ==== You are searching for a file and wonder what package provides it ====
Line 15: Line 11:
 A typical example are .so files and .h files pointed out by configurewhen you install something from source. To find those file, you need to install apt-file then run apt-file update to build the database of files-packages associations. Once you do this you can apt-file search any file. A typical example are .so files and .h files pointed out by configurewhen you install something from source. To find those file, you need to install apt-file then run apt-file update to build the database of files-packages associations. Once you do this you can apt-file search any file.
  
-==== You have a file and wonder what package installed it ==== 
  
-dpkg -S file 
  
 ==== Installing a .deb package and its dependencies ==== ==== Installing a .deb package and its dependencies ====
Line 28: Line 22:
  
 You have to run auto-apt update and auto-apt update-local first (cache and db generation). You have to run auto-apt update and auto-apt update-local first (cache and db generation).
- 
-==== How do you know if a package is installed or not ? ==== 
- 
-If you know the exact name of the package then 
- 
-<​code>​ 
-dpkg -s package_name 
-</​code>​ 
- 
-if you don't know it then 
-<​code>​ 
-dpkg-query -l pattern 
-</​code>​ 
-or 
-<​code>​ 
-dpkg --get-selections | grep pattern 
-</​code>​ 
  
 ---- ----

QR Code
QR Code You are searching for a file and wonder what package provides it (generated for current page)