Difference between revisions of "Dpkg"

From Linuxintro
imported>ThorstenStaerk
Line 34: Line 34:
 
= TroubleShooting =
 
= TroubleShooting =
  
== Example problem ==
+
I'm impressed! You've managed the alosmt impossible.
<pre>
 
root@lvps83-169-3-117:~# apt-get install kde
 
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:
 
  kde: Depends: kde-core (>= 5:47) but it is not going to be installed
 
      Depends: kde-amusements (>= 5:47) but it is not going to be installed
 
      Depends: kdeaccessibility (>= 4:3.4.3) but it is not going to be installed
 
      Depends: kdeaddons (>= 4:3.4.3) but it is not going to be installed
 
      Depends: kdeadmin (>= 4:3.4.3) but it is not going to be installed
 
      Depends: kdeartwork (>= 4:3.4.3) but it is not going to be installed
 
      Depends: kdegraphics (>= 4:3.4.3) but it is not going to be installed
 
      Depends: kdemultimedia (>= 4:3.4.3) but it is not going to be installed
 
      Depends: kdenetwork (>= 4:3.4.3) but it is not going to be installed
 
      Depends: kdepim (>= 4:3.4.3) but it is not going to be installed
 
      Depends: kdeutils (>= 4:3.4.3) but it is not going to be installed
 
      Depends: kdewebdev (>= 4:3.4.3) but it is not going to be installed
 
  psa: Depends: libpam-plesk but it is not going to be installed
 
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
 
</pre>
 
Once solution was to remove a postuninstall script, /var/lib/dpkg/info/psa-imp.postrm
 

Revision as of 14:31, 22 May 2011

dpkg is Debian's default packaging software. However you will normally use apt-get to install Debian software. Here are package management issues and how you achieve them using dpkg or rpm.

Issue rpm dpkg
how files are called *.rpm *.deb
list all installed packages rpm -qa dpkg -l
list all installed packages by order of installation date rpm -qa --last
install a package from a file rpm -i file.rpm dpkg -i file.deb
list package content rpm -ql package dpkg -L package
find what package provides the installed file /bin/ls rpm -qf /bin/ls dpkg --search /bin/ls
look at a package file description dpkg -I file.deb
look at a package description rpm -qi package apt-cache show package
find which installed package provides /bin/bash rpm -qf /bin/bash dpkg -S /bin/bash (to also search in not installed packages you can use apt-file)
find what program provides the file Xlib.h auto-apt search Xlib.h
extract a package rpm2cpio blah.rpm | cpio -id dpkg -x datei.deb target_folder
remove a package, but do not run pre-uninstall scripts before rpm -e --nopreun xyz rm /var/lib/dpkg/info/xyz.prerm; dpkg -r xyz

TroubleShooting

I'm impressed! You've managed the alosmt impossible.