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

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

-i package安装一个软件包

-s name查看软件包信息

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

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

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

例子

  1. $sudo dpkg -i rxvt_1%3a2.6.4-14_i386.deb
  2. Selecting previously unselected package rxvt.
  3. (Reading database ... 193732 files and directories currently installed.)
  4. Unpacking rxvt (from rxvt_1%3a2.6.4-14_i386.deb) ...
  5. Setting up rxvt (1:2.6.4-14) ...
  6. update-alternatives: using /usr/bin/rxvt-xterm to provide /usr/bin/rxvt (rxvt) in auto mode.
  7. update-alternatives: error: no alternatives for rclock.
  8. Processing triggers for man-db ...
  1. $sudo dpkg -s rxvt
  2. Package: rxvt
  3. Status: install ok installed
  4. Priority: optional
  5. Section: x11
  6. Installed-Size: 536
  7. Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
  8. Architecture: i386
  9. Version: 1:2.6.4-14
  10. Provides: x-terminal-emulator
  11. Depends: libc6 (>= 2.4), libx11-6, libxpm4
  12. Conffiles:
  13. /etc/menu-methods/rxvt b0dfbc8f0b846ed1d5021cbdcc3b872a
  14. Description: VT102 terminal emulator for the X Window System
  15. Rxvt is an 8-bit clean, color xterm replacement that uses significantly
  16. less memory than a conventional xterm, mostly since it doesn't support
  17. toolkit configurability or Tek graphics, but also since features can
  18. be removed at compile-time to reflect your needs.
  19. .
  20. The distribution also includes rclock, the smaller/better xclock
  21. replacement with appointment scheduling and xbiff functionality.
  22. Original-Maintainer: Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>
  1. $sudo dpkg -L rxvt
  2. /.
  3. /usr
  4. /usr/bin
  5. /usr/bin/rxvt-xterm
  6. /usr/bin/rxvt-xpm
  7. /usr/bin/rclock
  8. /usr/share
  9. /usr/share/man
  10. /usr/share/man/man1
  11. /usr/share/man/man1/rclock.1.gz
  12. /usr/share/man/man1/rxvt-xterm.1.gz
  13. /usr/share/doc
  14. /usr/share/doc/rxvt
  15. /usr/share/doc/rxvt/examples
  16. /usr/share/doc/rxvt/examples/example.menu
  17. /usr/share/doc/rxvt/examples/jedmenu.sl
  18. /usr/share/doc/rxvt/examples/menu
  19. /usr/share/doc/rxvt/examples/rxvt.menu
  20. /usr/share/doc/rxvt/examples/terminal.menu
  21. /usr/share/doc/rxvt/html
  22. /usr/share/doc/rxvt/html/rxvt.html
  23. /usr/share/doc/rxvt/html/rxvtRef-frame.html
  24. /usr/share/doc/rxvt/html/rxvtRef-toc.html
  25. /usr/share/doc/rxvt/html/rxvtRef.html
  26. /usr/share/doc/rxvt/BUGS
  27. /usr/share/doc/rxvt/README.xvt.gz
  28. /usr/share/doc/rxvt/README.menu
  29. /usr/share/doc/rxvt/xterm.seq.gz
  30. /usr/share/doc/rxvt/FAQ.Debian.gz
  31. /usr/share/doc/rxvt/changelog.Debian.gz
  32. /usr/share/doc/rxvt/README.Debian
  33. /usr/share/doc/rxvt/copyright
  34. /usr/share/doc/rxvt/changelog.gz
  35. /usr/share/doc/rxvt/FAQ.gz
  36. /usr/share/doc/rxvt/README.greek.gz
  37. /usr/share/doc/rxvt/rxvtRef.txt.gz
  38. /usr/share/lintian
  39. /usr/share/lintian/overrides
  40. /usr/share/lintian/overrides/rxvt
  41. /usr/share/menu
  42. /usr/share/menu/rxvt
  43. /etc
  44. /etc/menu-methods
  45. /etc/menu-methods/rxvt
  46. /usr/share/man/man1/rxvt-xpm.1.gz
  1. $sudo dpkg -r rxvt
  2. (Reading database ... 193765 files and directories currently installed.)
  3. Removing rxvt ...
  4. update-alternatives: using /usr/bin/rxvt-xpm to provide /usr/bin/rxvt (rxvt) in auto mode.
  5. Processing triggers for man-db ...
  6. $sudo dpkg -s rxvt
  7. Package: rxvt
  8. Status: deinstall ok config-files
  9. Priority: optional
  10. Section: x11
  11. Installed-Size: 536
  12. Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
  13. Architecture: i386
  14. Version: 1:2.6.4-14
  15. Config-Version: 1:2.6.4-14
  16. Provides: x-terminal-emulator
  17. Depends: libc6 (>= 2.4), libx11-6, libxpm4
  18. Conffiles:
  19. /etc/menu-methods/rxvt b0dfbc8f0b846ed1d5021cbdcc3b872a
  20. Description: VT102 terminal emulator for the X Window System
  21. Rxvt is an 8-bit clean, color xterm replacement that uses significantly
  22. less memory than a conventional xterm, mostly since it doesn't support
  23. toolkit configurability or Tek graphics, but also since features can
  24. be removed at compile-time to reflect your needs.
  25. .
  26. The distribution also includes rclock, the smaller/better xclock
  27. replacement with appointment scheduling and xbiff functionality.
  28. Original-Maintainer: Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>
  1. $sudo dpkg -P rxvt
  2. (Reading database ... 193733 files and directories currently installed.)
  3. Removing rxvt ...
  4. Purging configuration files for rxvt ...
  5. $sudo dpkg -s rxvt
  6. Package `rxvt' is not installed and no info is available.
  7. Use dpkg --info (= dpkg-deb --info) to examine archive files,
  8. 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. Java面试题汇总(一)

    1.谈谈你对http中post和get访问的理解. http定义了与服务器交互的不同方法,最基本的方法有4种,分别是GET,POST,PUT,DELETE.URL全称是资源描述符,我们可以这样认 为: ...

  2. Verilog学习笔记设计和验证篇(五)...............层次化事件队列

    详细的了解层次化事件队列有助于理解Verilog的阻塞赋值和非阻塞赋值功能.所谓层次化事件队列指的是用于调度仿真时间的不同Verilog事件队列.在IEEE的5.3节中定义了层次化事件队列在逻辑上分为 ...

  3. POS机刷卡跨行交易的清算方式

    POS机刷卡的参与方比较多.以你在星巴克刷卡为例: 持卡人--你 发卡行--你办这张卡的银行,我们假设是工行 商户--星巴克,我们假设星巴克的账户开在建行 收单行--星巴克的刷卡机的归属银行,假设也是 ...

  4. SpringFramework的简介

    一.前言 Spring提供了一种轻量级的解决方案,用于建立"快装式企业应用".在此基础上,Spring还提供了包括声明式事务管理,RMI或Web Services远程访问业务逻辑, ...

  5. java内存模型-顺序一致性

    数据竞争与顺序一致性保证 当程序未正确同步时,就会存在数据竞争.java 内存模型规范对数据竞争的定义如下: 在一个线程中写一个变量, 在另一个线程读同一个变量, 而且写和读没有通过同步来排序. 当代 ...

  6. Java基础学习总结--对象容器

    目录: ArrayList 顺序泛型容器 HashSet 集合容器 HashMap<Key,Value>容器 要用Java实现记事本的功能.首先列出记事本所需功能: 可以添加记录(字符串) ...

  7. pywebsocket的搭建

    Python可以搭建pywebsocket(Web服务器,python websocket),搭建pywebsocket必须要已经安装了python,点我查看python的下载与安装.在这篇Blog中 ...

  8. react实例之todo,做一个实时响应的列表操作

    react实例之todo, 做一个实时响应的列表操作 在所有的mvc框架中,最常见的例子不是hello world,而是todo,由于reactjs的简单性,在不引用flux和redux的情况下,我们 ...

  9. iOS 代理协议

    代理,又称委托代理(delegate),是iOS中常用的设计一种模式.顾名思义,它是把某个对象要做的事情委托给别的对象去做.那么别的对象就是这个对象的代理,代替它来打理要做的事.反映到程序中, 首先要 ...

  10. Web安全攻防-----TCP/IP安全篇

    知识点: 掌握TCP/IP的体系分层结构 掌握TCP/IP的各一层功能特点 掌握TCP/IP的数据在各层的名称 掌握TCP/IP的体系数据的封装和解封装 1.TCP/IP协议的历史 TCP/IP的起源 ...