dpkg是debian最早提出的一个软件包管理工具,因为早期并没有考虑到当下软件包之间这么复杂的依赖关系,所以并不能自动解决软件包的依赖问题,这个命令多用于安装本地的.deb软件包,也可以进行软件包的维护

$sudo dpkg [-isLrP] [软件包或软件名]

-i package安装一个软件包

-s name查看软件包信息

-L name查看软件包的安装路径

-r name卸载软件,保留配置文件

-P name卸载软件,同时删除配置文件

例子

$sudo dpkg -i rxvt_1%3a2.6.4-14_i386.deb
Selecting previously unselected package rxvt.
(Reading database ... 193732 files and directories currently installed.)
Unpacking rxvt (from rxvt_1%3a2.6.4-14_i386.deb) ...
Setting up rxvt (1:2.6.4-14) ...
update-alternatives: using /usr/bin/rxvt-xterm to provide /usr/bin/rxvt (rxvt) in auto mode.
update-alternatives: error: no alternatives for rclock.
Processing triggers for man-db ...
$sudo dpkg -s rxvt
Package: rxvt
Status: install ok installed
Priority: optional
Section: x11
Installed-Size: 536
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
Architecture: i386
Version: 1:2.6.4-14
Provides: x-terminal-emulator
Depends: libc6 (>= 2.4), libx11-6, libxpm4
Conffiles:
/etc/menu-methods/rxvt b0dfbc8f0b846ed1d5021cbdcc3b872a
Description: VT102 terminal emulator for the X Window System
Rxvt is an 8-bit clean, color xterm replacement that uses significantly
less memory than a conventional xterm, mostly since it doesn't support
toolkit configurability or Tek graphics, but also since features can
be removed at compile-time to reflect your needs.
.
The distribution also includes rclock, the smaller/better xclock
replacement with appointment scheduling and xbiff functionality.
Original-Maintainer: Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>
$sudo dpkg -L rxvt
/.
/usr
/usr/bin
/usr/bin/rxvt-xterm
/usr/bin/rxvt-xpm
/usr/bin/rclock
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/rclock.1.gz
/usr/share/man/man1/rxvt-xterm.1.gz
/usr/share/doc
/usr/share/doc/rxvt
/usr/share/doc/rxvt/examples
/usr/share/doc/rxvt/examples/example.menu
/usr/share/doc/rxvt/examples/jedmenu.sl
/usr/share/doc/rxvt/examples/menu
/usr/share/doc/rxvt/examples/rxvt.menu
/usr/share/doc/rxvt/examples/terminal.menu
/usr/share/doc/rxvt/html
/usr/share/doc/rxvt/html/rxvt.html
/usr/share/doc/rxvt/html/rxvtRef-frame.html
/usr/share/doc/rxvt/html/rxvtRef-toc.html
/usr/share/doc/rxvt/html/rxvtRef.html
/usr/share/doc/rxvt/BUGS
/usr/share/doc/rxvt/README.xvt.gz
/usr/share/doc/rxvt/README.menu
/usr/share/doc/rxvt/xterm.seq.gz
/usr/share/doc/rxvt/FAQ.Debian.gz
/usr/share/doc/rxvt/changelog.Debian.gz
/usr/share/doc/rxvt/README.Debian
/usr/share/doc/rxvt/copyright
/usr/share/doc/rxvt/changelog.gz
/usr/share/doc/rxvt/FAQ.gz
/usr/share/doc/rxvt/README.greek.gz
/usr/share/doc/rxvt/rxvtRef.txt.gz
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/rxvt
/usr/share/menu
/usr/share/menu/rxvt
/etc
/etc/menu-methods
/etc/menu-methods/rxvt
/usr/share/man/man1/rxvt-xpm.1.gz
$sudo dpkg -r rxvt
(Reading database ... 193765 files and directories currently installed.)
Removing rxvt ...
update-alternatives: using /usr/bin/rxvt-xpm to provide /usr/bin/rxvt (rxvt) in auto mode.
Processing triggers for man-db ...
$sudo dpkg -s rxvt
Package: rxvt
Status: deinstall ok config-files
Priority: optional
Section: x11
Installed-Size: 536
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
Architecture: i386
Version: 1:2.6.4-14
Config-Version: 1:2.6.4-14
Provides: x-terminal-emulator
Depends: libc6 (>= 2.4), libx11-6, libxpm4
Conffiles:
/etc/menu-methods/rxvt b0dfbc8f0b846ed1d5021cbdcc3b872a
Description: VT102 terminal emulator for the X Window System
Rxvt is an 8-bit clean, color xterm replacement that uses significantly
less memory than a conventional xterm, mostly since it doesn't support
toolkit configurability or Tek graphics, but also since features can
be removed at compile-time to reflect your needs.
.
The distribution also includes rclock, the smaller/better xclock
replacement with appointment scheduling and xbiff functionality.
Original-Maintainer: Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>
$sudo dpkg -P rxvt
(Reading database ... 193733 files and directories currently installed.)
Removing rxvt ...
Purging configuration files for rxvt ...
$sudo dpkg -s rxvt
Package `rxvt' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.

dpkg的更多相关文章

  1. deb包的安装及dpkg命令小结

    DPKG commands There are two actions, they are dpkg-query and dpkg-deb. Install a package # sudo dpkg ...

  2. Debian的软件包管理工具命令 (dpkg,apt-get)详解

    本文转载于:http://blog.chinaunix.net/uid-20769502-id-106056.html   1.dpkg包管理工具 dpkg --info "软件包名&quo ...

  3. dpkg:处理软件包dradis (--configure)时出错

    dpkg:处理软件包dradis (--configure)时出错!解决方案:1.将info文件夹更名%mv /var/lib/dpkg/info /var/lib/dpkg/info_old2.新建 ...

  4. ubuntu 常见错误--Could not get lock /var/lib/dpkg/lock

    ubuntu 常见错误--Could not get lock /var/lib/dpkg/lock 通过终端安装程序sudo apt-get install xxx时出错:E: Could not ...

  5. Ubuntu——apt && dpkg参考

    一.apt apt-cache search # ------(package 搜索包) apt-cache show #------(package 获取包的相关信息,如说明.大小.版本等) sud ...

  6. 解决:dpkg:处理 xxx (--configure)或E: Sub-process /usr/bin/dpkg returned an error code (1)

    问题重现: 问题解决办法: #先备份原来的,然后重新新建 sudo mv /var/lib/dpkg/info /var/lib/dpkg/info.bak //现将info文件夹更名 sudo mk ...

  7. Debian 8中dpkg -i自动解决依赖关系

    dpkg -i 后#apt-get update &&apt-get -f install

  8. could not get lock /var/lib/dpkg/lock

    这个问题的原因可能是有另外一个程序正在运行,导致资源被锁不可用.而导致资源被锁的原因,可能是上次安装时没正常完成,而导致出现此状况. 解决方法:输入以下命令 sudo rm /var/cache/ap ...

  9. dpkg: 处理归档 /var/cache/apt/archives/软件名 (--unpack)时出错:由于已经达到 MaxReports 限制,没有写入 apport 报告。

    一.环境介绍: OS:ubuntu16.04 64bit 二.错误如下: 正准备解包 .../libqt4-script_4%3a4.8.7+dfsg-5ubuntu2_i386.deb  ...正在 ...

  10. 解决问题E: 无法获得锁 /var/lib/dpkg/lock - open (11: 资源暂时不可用) E: 无法锁定管理目录,

    在用sudo apt-get install kmymoney2安装软件kmymoney2时,由于速度太慢,想换个软件源,直接关闭了终端,apt-get但进程没有结束,结果终端提示:“E: 无法获得锁 ...

随机推荐

  1. Scalaz(5)- typeclass:my typeclass scalaz style-demo

    我们在上一篇讨论中介绍了一些基本的由scalaz提供的typeclass.这些基本typeclass主要的作用是通过操作符来保证类型安全,也就是在前期编译时就由compiler来发现错误.在这篇讨论中 ...

  2. [moka同学笔记]Yii2.0显示页匿名函数设置$value

    匿名函数设置$value <?= GridView::widget([ 'dataProvider' => $dataProvider, 'columns' => [ // ['cl ...

  3. GJM: Unity3D AssetBundle 手记 [转载]

    这篇文章从AssetBundle的打包,使用,管理以及内存占用各个方面进行了比较全面的分析,对AssetBundle使用过程中的一些坑进行填补指引以及喷!   AssetBundle是Unity推荐的 ...

  4. jQuery中的事件与动画 (你的明天Via Via)

    众所周知,页面在加载时,会触发load事件:当用户单击某个按钮时,会触发该按钮的click事件. 这些事件就像日常生活中,人们按下开关,灯就亮了(或者灭了),往游戏机里投入游戏币就可以启动游戏一样, ...

  5. Immutable.js – JavaScript 不可变数据集合

    不可变数据是指一旦创建就不能被修改的数据,使得应用开发更简单,允许使用函数式编程技术,比如惰性评估.Immutable JS 提供一个惰性 Sequence,允许高效的队列方法链,类似 map 和 f ...

  6. 【web前端面试题整理01】各位加班累了吧,来做点前端面试题吧

    前言 最近小叶子有点疲惫,主要是在外地工作生活上不太适应,吃一样的东西,我居然会拉肚子,而且是一个星期一个星期的.... 脸上长了一个豆豆一个星期还没消,我那个去啊. 昨天上午上班后,本来想继续研究j ...

  7. Hybrid框架UI重构之路:三、工欲善其事,必先利其器

    上文回顾:Hybird框架UI重构之路:二.事出有因 工欲善其事,必先利其器,事是重构的目标,器是开发环境. 这篇文章将讲述重构时的UI框架的目录结构,且需要使用的开发工具. 目录结构 demo : ...

  8. Snort - manual 笔记(五)

    1.9 Miscellaneous 1.9.1 Running Snort as a Daemon 如果你想让Snort作为守护程序运行,你可以在最后加上 -D 选项.清注意如果你想通过发送一个 SI ...

  9. Client JQuery invoke NetSuite Suitelet

    Please indicate the source if you need to repost. Client jQuery could initialize a cross-domain requ ...

  10. 为Windows Azure Web站点添加MIME类型解决文件下载失败的问题

    这几天在倒腾Autodesk 360 Viewer,前面的文章也介绍过了,这将是一个全新的在线模型浏览工具.我做了个实验,把A360Viewer放在一个web 站点,然后发布到Windows Azur ...