zoukankan      html  css  js  c++  java
  • Linux使用技巧9--用dpkg管理你的软件

    dpkg(package manager for Debian): debian体系中的包管理工具。

    Commands:
      -i|--install       <.deb file name> ... | -R|--recursive <directory> ...
    -r|--remove        <package> ... | -a|--pending

    1.查看已经安装的软件

    $ dpkg -l
    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              Architecture         Description
    +++-===============================-====================-====================-====================================================================
    ii  account-plugin-aim              3.8.6-0ubuntu9.1     amd64                Messaging account plugin for AIM
    ii  ack-grep                        2.12-1               all                  grep-like program specifically for large source trees

    2.安装deb格式的软件

    有时候会下载deb的软件,如virtualbox,那么我们就能够这样安装:

    $ sudo dpkg -i virtualbox-4.3_4.3.26-98988~Ubuntu~raring_amd64.deb 
    Selecting previously unselected package virtualbox-4.3.
    (Reading database ... 237712 files and directories currently installed.)
    Preparing to unpack virtualbox-4.3_4.3.26-98988~Ubuntu~raring_amd64.deb ...
    Unpacking virtualbox-4.3 (4.3.26-98988~Ubuntu~raring) ...
    Setting up virtualbox-4.3 (4.3.26-98988~Ubuntu~raring) ...
    Adding group `vboxusers' (GID 127) ...
    Done.

    3.查看deb的信息

    -I參数,查看具体信息

    $ dpkg -I virtualbox-4.3_4.3.26-98988~Ubuntu~raring_amd64.deb 
     new debian package, version 2.0.
     size 64750912 bytes: control archive=23332 bytes.
         118 bytes,     4 lines      conffiles            
        1371 bytes,    20 lines      control              
       58951 bytes,   641 lines      md5sums              
       14579 bytes,   365 lines   *  postinst             #!/bin/sh
        2144 bytes,    59 lines   *  postrm               #!/bin/sh
        3335 bytes,    98 lines   *  preinst              #!/bin/bash
        3100 bytes,   100 lines   *  prerm                #!/bin/sh
        4666 bytes,   107 lines      templates            
     Package: virtualbox-4.3
     Version: 4.3.26-98988~Ubuntu~raring
     Architecture: amd64
     Maintainer: Oracle Corporation <info@virtualbox.org>
     Installed-Size: 147848
    

    -c,查看包中的文件结构

    $ dpkg -c virtualbox-4.3_4.3.26-98988~Ubuntu~raring_amd64.deb 
    drwxr-xr-x root/root         0 2015-03-17 02:12 ./
    drwxr-xr-x root/root         0 2015-03-17 02:12 ./etc/
    drwxr-xr-x root/root         0 2015-03-17 02:12 ./etc/init.d/
    -rwxr-xr-x root/root      6796 2015-03-17 02:12 ./etc/init.d/vboxautostart-service
    -rwxr-xr-x root/root     12680 2015-03-17 02:12 ./etc/init.d/vboxdrv
    
  • 相关阅读:
    如何退出Vi编辑状态
    iOS开发第三方工具——MBProgressHUD
    iOS开发第三方工具——AFNetworking
    iOS开发第三方工具——JSONKit
    iOS开发第三方工具——SSToolkit
    TestFlight工具的使用
    Block 的循环引用
    在 iOS 9 中使用 UIStackView 的总结
    说说视图层架构
    iOS开发技巧(2)
  • 原文地址:https://www.cnblogs.com/mengfanrong/p/5225685.html
Copyright © 2011-2022 走看看