2008年1月9日 星期三

debian 套件管理

debian 最基本的套件管理工具是 dpkg 操作對象為檔案名稱
另一個工具是 apt 操作對象為套件名稱

dpkg
語法 dpkg [option] action
dpkg會維護 /var/lib/dpkg 目錄下的套件資訊
其中 available 列出所有可用套件
status 紀錄套件的屬性
選項
-i 接套件名稱 安裝指定的套件
-l 接pattern 在以安裝的套建中 列出指定的 pattern 以及相關資料
-L 接套件名稱 列出安裝該套件所會安裝的檔案
-r 接套件名稱 移除該套件 但保留組態檔
--purge 接套件名稱 移除該套件的所有檔案
--info 接套件名稱 套件相關資訊
其他的 請找man吧

使用 --info 的範例
==============================================
xiang-debian:/tmp# dpkg --info lynx_2.8.5-2sarge2.2_i386.deb
新格式的 debian 套件,版本是 2.0。
大小 1859352 bytes:主控檔案=1200 bytes。
14 字節, 1 行 conffiles
854 字節, 20 行 control
468 字節, 20 行 * postinst #!/bin/sh
228 字節, 15 行 * postrm #!/bin/sh
537 字節, 15 行 * preinst #!/bin/sh
206 字節, 9 行 * prerm #!/bin/sh
Package: lynx
Version: 2.8.5-2sarge2.2
Section: web
Priority: optional
Architecture: i386
Depends: libbz2-1.0, libc6 (>= 2.3.6-6), libgnutls13 (>= 1.4.0-0), libncursesw5 (>= 5.4-5), zlib1g (>= 1:1.2.1)
Recommends: mime-support
Conflicts: lynx-ssl
Replaces: lynx-ssl
Provides: www-browser, news-reader, lynx-ssl
Installed-Size: 4568
Maintainer: James Troup
Description: Text-mode WWW Browser
Lynx is a fully-featured World Wide Web (WWW) client for users
running cursor-addressable, character-cell display devices (e.g.,
vt100 terminals, vt100 emulators running on PCs or Macs, or any other
"curses-oriented" display). It will display hypertext markup language
(HTML) documents containing links to files residing on the local
system, as well as files residing on remote systems running Gopher,
HTTP, FTP, WAIS, and NNTP servers.
===============================================

沒有留言: