Thursday, July 09, 2009

Install local .deb packages

Ususally, apt-get is used to install/update/remove packages. It is preferred because it can automatically resolve package dependency.

However, sometimes you must download a .deb package file and install it from local disk. dpkg can do this task.
dpkg -i package_name_here
However, dpkg does NOT resolve package dependency. So it is likely that the installed program won't work.
You can fix it by using command
apt-get -f install

Another solution is documented here:
http://www.debian.org/doc/manuals/apt-howto/ch-basico.en.html#s-dpkg-scanpackages.
The idea is to build a tarball (Packages.gz) that can be recognized by apt tools. Then you can install the program by using apt-get command. (In other words, .deb does not contain enough information which is required by apt tools).

Resources
APT HOWTO: http://www.debian.org/doc/manuals/apt-howto/

No comments: