dpkg命令使用
dpkg -l 查看当前系统中已经安装的软件包的信息
例子:dpkg -l | grep libmysqlclient-dev
Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii libmysqlclient 5.5.28-0ubuntu MySQL database development files roger@roger-machine:/usr/include/mysql/mysql$ dpkg -l | grep libmysqlclient-dev ii libmysqlclient-dev 5.5.28-0ubuntu0.12.04.3 MySQL database development filesdpkg -L (软件包名称)查看系统中已经安装的软件文件的详细列表
roger@roger-machine:/usr/include/mysql/mysql$ dpkg -L libmysqlclient-dev | head -n 5 /. /usr /usr/bin /usr/bin/mysql_config /usr/libdpkg -s 查看已经安装的指定软件包的详细信息
Package: libmysqlclient-dev Status: install ok installed Priority: optional Section: libdevel Installed-Size: 4965 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Architecture: i386 Source: mysql-5.5 Version: 5.5.28-0ubuntu0.12.04.3 Replaces: libmysqlclient15-dev Provides: libmysqlclient15-dev Depends: libmysqlclient18 (= 5.5.28-0ubuntu0.12.04.3), zlib1g-dev Conflicts: libmysqlclient10-dev, libmysqlclient12-dev, libmysqlclient14-dev, libmysqlclient15-dev Description: MySQL database development files MySQL is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query language in the world. The main goals of MySQL are speed, robustness and ease of use. . This package includes development libraries and header files. Homepage: http://dev.mysql.com/ Original-Maintainer: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>dpkg -S 查看系统中的某个文件属于那个软件包;
dpkg -i *.deb文件的安装
dpkg -r *.deb文件的卸载;