apt会解决和安装模块的依赖问题,并会咨询软件仓库, 但不会安装本地的deb文件, apt是建立在dpkg之上的软件管理工具
sudo apt-get update Consults /etc/apt/sources.list
and updates the database of available
packages. Be sure to run this command
whenever sources.list is changed.
apt-cache search
database for the keyword given. The
package names and descriptions are
returned where that keyword is found.
sudo apt-get install
name as found in the package database.
Starting with APT version 0.6, this
command will automatically verify
package authenticity for gpg keys it
knows about (http://wiki.debian
.org/SecureApt).
sudo apt-get -d install
in /var/cache/apt/archives.
apt-cache show
from the named package.
sudo apt-get upgrade Check updates for all installed packages
and then prompt to download
and install them.
sudo apt-get dist-upgrade Updates the entire system to a new
release, even if it means removing
packages. Note: This is not the preferred
method for updating a system.
sudo apt-get autoclean Can be run anytime to delete partially
downloaded packages, or packages
no longer installed.
sudo apt-get clean Removes all cached packages from
/var/cache/apt/archives to
free up disk space.
sudo apt-get --purge remove
its configuration files. Remove the
--purge keyword to keep config
files.
sudo apt-get -f install Do a sanity check for broken packages.
This tries to fix any “unmet
dependency” messages.
apt-config -V Print version information of installed
APT utilities.
sudo apt-key list List gpg keys that APT knows about.
apt-cache stats Print statistics on all packages
installed.
apt-cache depends Print dependencies for a package
(whether it’s installed or not).
apt-cache pkgnames List all packages installed on the
system.
dpkg -c <.deb file> Lists files which are installed by the
.deb file given (.deb file must be
path/filename).
dpkg -I <.deb file> Lists information about the .deb
given file.
dpkg -p
dkpg -S
file name is found. This can be a path,
or just the name of a file.
dpkg -l Lists installed packages. This will also
take options for more specific info.
dpkg -L
installed from package (package must
have been previously installed).
dpkg -s
sudo dpkg -i <.deb file> Installs the given .deb file.
sudo dpkg -r
system, but leaves files behind.
sudo dpkg -P
given package.
sudo dpkg -x <.deb file>
.deb file to a destination directory.
Note that this will reset permissions
on the target directory.
aqq5220 于 2010-01-18 09:37:07发表:
安装软件就用apt
安装本地软件用dpkg,有依赖就用apt查一下!然后一个一个下载,慢慢折腾!
心情不好直接gdebi!
偶新人一个!高手请指教!
lijiang 于 2010-01-16 22:54:07发表:
dpkg是用来安装.deb文件,但不会解决模块的依赖关系,且不会关心ubuntu的软件仓库内的软件,可以用于安装本地的deb文件
apt会解决和安装模块的依赖问题,并会咨询软件仓库, 但不会安装本地的deb文件, apt是建立在dpkg之上的软件管理工具
-正好解决我的问题