debian-faq 8.1 - en to zh_CN translation catalogue (88 entries)

note: type: Content of: <chapter><title>
en: The Debian package management tools
zh_CN: Debian 软件包管理工具

note: type: Content of: <chapter><section><title>
en: What programs does Debian provide for managing its packages?
zh_CN: Debian 提供了哪些软件包管理程序？

note: type: Content of: <chapter><section><para>
en: There are multiple tools that are used to manage Debian packages, from graphic or text-based interfaces to the low level tools used to install packages.  All the available tools rely on the lower level tools to properly work and are presented here in decreasing complexity level.
zh_CN: 有多个工具可以管理 Debian 软件包，从图形或文本界面工具，到用于安装软件包的底层工具。所有可用的工具都依赖底层的工具才能正常工作，这里按照复杂度从高到低排序。

note: type: Content of: <chapter><section><para>
en: It is important to understand that the higher level package management tools such as <command>aptitude</command> or <command>synaptic</command> rely on <command>apt</command> which, itself, relies on <command>dpkg</command> to manage the packages in the system.
zh_CN: 很重要的一个知识点是高层的软件包管理工具，例如 <command>aptitude</command> 或 <command>synaptic</command>，依赖 <command>apt</command>，而 <command>apt</command> 又依赖 <command>dpkg</command> 来管理系统中的软件包。

note: type: Content of: <chapter><section><para>
en: See <ulink url="https://www.debian.org/doc/manuals/debian-reference/ch02.en.html">Chapter 2.  Debian package management</ulink> of the <ulink url="&url-debian-reference;">Debian reference</ulink> for more information about the Debian package management utilities.  This document is available in various languages and formats, see <ulink url="https://www.debian.org/doc/user-manuals#quick-reference">the Debian Reference entry in the DDP Users' Manuals overview</ulink>.
zh_CN: 参见 <ulink url="&url-debian-reference;">Debian 参考手册</ulink>的<ulink url="https://www.debian.org/doc/manuals/debian-reference/ch02.en.html">第 2 章 Debian 软件包管理</ulink>以获得关于 Debian 软件包管理工具的更多信息。该文档有多种语言的翻译以及不同的格式，参见 <ulink url="https://www.debian.org/doc/user-manuals#quick-reference">Debian 用户手册概览中的 Debian 参考手册条目</ulink>。

note: type: Content of: <chapter><section><section><para>
en: This is the main package management program.  <command>dpkg</command> can be invoked with many options.  Some common uses are:
zh_CN: 这是主要的软件包管理程序。<command>dpkg</command> 支持很多选项。常用的有：

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: Find out all the options: <literal>dpkg --help</literal>.
zh_CN: 列出所有选项：<literal>dpkg --help</literal>。

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: Print out the control file (and other information) for a specified package: <literal>dpkg --info foo_VVV-RRR.deb</literal>.
zh_CN: 打印指定的软件包的控制文件（和其他信息）：<literal>dpkg --info foo_VVV-RRR.deb</literal>。

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: Install a package (including unpacking and configuring) onto the file system of the hard disk: <literal>dpkg --install foo_VVV-RRR.deb</literal>.
zh_CN: 安装软件包（包括解压缩和配置）到硬盘上的文件系统中：<literal>dpkg --install foo_VVV-RRR.deb</literal>。

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: Unpack (but do not configure) a Debian archive into the file system of the hard disk: <literal>dpkg --unpack foo_VVV-RRR.deb</literal>.  Note that this operation does <emphasis>not</emphasis> necessarily leave the package in a usable state; some files may need further customization to run properly.  This command removes any already-installed version of the program and runs the preinst (see <xref linkend="maintscripts"/>) script associated with the package.
zh_CN: 解压缩（但不配置）Debian 档案到硬盘上的文件系统中：<literal>dpkg --unpack foo_VVV-RRR.deb</literal>。注意，经过这一操作的软件包<emphasis>不一定</emphasis>可以使用；有些文件可能需要进一步配置才可以正常运行。这一命令会卸载该程序的任何已经安装的版本，并执行软件包的 preinst（参见<xref linkend="maintscripts"/>）脚本。

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: Configure a package that already has been unpacked: <literal>dpkg --configure foo</literal>.  Among other things, this action runs the postinst (see <xref linkend="maintscripts"/>)  script associated with the package.  It also updates the files listed in the <literal>conffiles</literal> for this package.  Notice that the 'configure' operation takes as its argument a package name (e.g., foo), <emphasis>not</emphasis> the name of a Debian archive file (e.g., foo_VVV-RRR.deb).
zh_CN: 配置一个已经被解压缩的软件包：<literal>dpkg --configure foo</literal>。这一命令会执行软件包的 postinst（参见<xref linkend="maintscripts"/>）脚本，并执行一些其他操作。这一命令也会更新软件包的 <literal>conffiles</literal> 列出的文件。注意“configure”操作的参数是软件包名（例如 foo），<emphasis>不是</emphasis> Debian 档案文件名（例如 foo_VVV-RRR.deb）。

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: Extract a single file named "blurf" (or a group of files named "blurf*") from a Debian archive: <literal>dpkg --fsys-tarfile foo_VVV-RRR.deb | tar -xf - 'blurf*'</literal>.
zh_CN: 从 Debian 档案中解压一个名为“blurf”的文件（或一组名为“blurf*”的文件）：<literal>dpkg --fsys-tarfile foo_VVV-RRR.deb | tar -xf - 'blurf*'</literal>。

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: Remove a package (but not its configuration files): <literal>dpkg --remove foo</literal>.
zh_CN: 卸载一个软件包（但不包括配置文件）：<literal>dpkg --remove foo</literal>。

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: Remove a package (including its configuration files): <literal>dpkg --purge foo</literal>.
zh_CN: 卸载一个软件包（包括配置文件）：<literal>dpkg --purge foo</literal>。

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: List the installation status of packages containing the string (or regular expression) "foo*": <literal>dpkg --list 'foo*'</literal>.
zh_CN: 列出包含字符串（或正则表达式）“foo*”的软件包的安装状态：<literal>dpkg --list 'foo*'</literal>。

note: type: Content of: <chapter><section><section><para>
en: APT is the <emphasis>Advanced Package Tool</emphasis>, an advanced interface to the Debian packaging system which provides the <command>apt-get</command> program.  It provides commandline tools for searching and managing packages, and for querying information about them, as well as low-level access to all features of the libapt-pkg library.  For more information, see the User's Guide in <literal>/usr/share/doc/apt-doc/guide.html/index.html</literal> (you will have to install the <systemitem role="package">apt-doc</systemitem> package).
zh_CN: APT 是<emphasis>高级包管理工具（Advanced Package Tool）</emphasis>，是 Debian 包管理系统的一个高级界面，提供了 <command>apt-get</command> 程序。它提供了可以搜索和管理软件包，以及查询软件包信息的命令行工具，以及访问 libapt-pkg 库的所有功能的底层接口。更多信息，请参阅位于 <literal>/usr/share/doc/apt-doc/guide.html/index.html</literal> 的用户指南（您需要先安装 <systemitem role="package">apt-doc</systemitem> 软件包）。

note: type: Content of: <chapter><section><section><para>
en: Starting with Debian Jessie, some frequently used <command>apt-get</command> and <command>apt-cache</command> commands have an equivalent via the new <command>apt</command> binary.  This means some popular commands like <command>apt-get update</command>, <command>apt-get install</command>, <command>apt-get remove</command>, <command>apt-cache search</command>, or <command>apt-cache show</command> now can also be called simply via <command>apt</command>, say <command>apt update</command>, <command>apt install</command>, <command>apt remove</command>, <command>apt search</command>, or <command>apt show</command>.  The following is an overview of the old and new commands:
zh_CN: 从 Debian Jessie 开始，一些常用的 <command>apt-get</command> 和 <command>apt-cache</command> 命令在新的 <command>apt</command> 程序中有一个等价的形式。这意味着某些流行的命令，例如 <command>apt-get update</command>、<command>apt-get install</command>、<command>apt-get remove</command>、<command>apt-cache search</command> 和 <command>apt-cache show</command> 可以简单地通过 <command>apt</command> 进行调用，比如 <command>apt update</command>、<command>apt install</command>、<command>apt remove</command>、<command>apt search</command> 和 <command>apt show</command>。以下是新旧命令的概览：

note: type: Content of: <chapter><section><section><screen>
en:  apt-get update             ->  apt update
     apt-get upgrade            ->  apt upgrade
     apt-get dist-upgrade       ->  apt full-upgrade
     apt-get install package    ->  apt install package
     apt-get remove package     ->  apt remove package
     apt-get autoremove         ->  apt autoremove
     apt-cache search string    ->  apt search string
     apt-cache policy package   ->  apt list -a package
     apt-cache show package     ->  apt show package
     apt-cache showpkg package  ->  apt show -a package
zh_CN:  apt-get update             ->  apt update
     apt-get upgrade            ->  apt upgrade
     apt-get dist-upgrade       ->  apt full-upgrade
     apt-get install 软件包    ->  apt install 软件包
     apt-get remove 软件包     ->  apt remove 软件包
     apt-get autoremove         ->  apt autoremove
     apt-cache search 字符串    ->  apt search 字符串
     apt-cache policy 软件包   ->  apt list -a 软件包
     apt-cache show 软件包     ->  apt show 软件包
     apt-cache showpkg 软件包  ->  apt show -a 软件包

note: type: Content of: <chapter><section><section><para>
en: The <command>apt</command> tool merges functionality of apt-get and apt-cache and by default has a fancier colored output format, making it more pleasant for humans.  For usage in scripts or advanced use cases, apt-get is still preferable or needed.
zh_CN: <command>apt</command> 工具整合了 apt-get 和 apt-cache 的功能，并且默认具有更漂亮的彩色输出格式，让人眼看起来更舒服。如果要用于脚本或者需要使用高级用法，则仍然建议或必须使用 apt-get。

note: type: Content of: <chapter><section><section><para><footnote><para>
en: Notice that there are ports that make this tool available with other package management systems, like Red Hat package manager, also known as <command>rpm</command>
zh_CN: 注意在其他软件包管理系统中也有这一工具的移植，比如红帽软件包管理器，又叫做 <command>rpm</command>。

note: type: Content of: <chapter><section><section><para>
en: <command>apt-get</command> provides a simple way to retrieve and install packages from multiple sources using the command line.  Unlike <command>dpkg</command>, <command>apt-get</command> does not understand .deb files, it works with the packages proper name and can only install .deb archives from a source specified in <filename>/etc/apt/sources.list</filename>.  <command>apt-get</command> will call <command>dpkg</command> directly after downloading the .deb archives<placeholder type="footnote" id="0"/> from the configured sources.
zh_CN: <command>apt-get</command> 提供了一种简单的方式来使用命令行从多个来源获取和安装软件包。和 <command>dpkg</command> 不同，<command>apt-get</command> 不能解析 .deb 文件，它使用包名来安装软件包，且只能从 <filename>/etc/apt/sources.list</filename> 指定的源里安装 .deb 文件。<command>apt-get</command> 从配置的源中下载完 .deb 档案<placeholder type="footnote" id="0"/>后会直接调用 <command>dpkg</command>。

note: type: Content of: <chapter><section><section><para>
en: Some common ways to use <command>apt-get</command> are:
zh_CN: 使用 <command>apt-get</command> 的常见方式有：

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: To update the list of packages known by your system, you can run:
zh_CN: 要更新您系统中的软件包列表，您可以运行：

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: (you should execute this regularly to update your package lists)
zh_CN: （您应该定期执行该命令以更新软件包列表）

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: To install the <replaceable>foo</replaceable> package and all its dependencies, run:
zh_CN: 要安装软件包 <replaceable>foo</replaceable> 和它的全部依赖，请运行：

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: To remove the foo package from your system, run:
zh_CN: 要从您的系统中卸载软件包 foo，请运行：

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: To remove the foo package and its configuration files from your system, run:
zh_CN: 要从您的系统中卸载软件包 foo 和它的配置文件，请运行：

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: To list all packages for which newer versions are available, run:
zh_CN: 要列出所有可以更新到新版本的软件包，请运行：

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: To upgrade all the packages on your system (without installing extra packages or removing packages), run:
zh_CN: 要升级您系统中的所有软件包（但不安装额外的软件包或卸载软件包），请运行：

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: To upgrade all the packages on your system, and, if needed for a package upgrade, installing extra packages or removing packages, run:
zh_CN: 要升级您系统中的所有软件包，并且在必要的时候安装额外的软件包或卸载软件包，请运行：

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: (The command <literal>upgrade</literal> keeps a package at its installed obsolete version if upgrading would need an extra package to be installed, for a new dependency to be satisfied.  The <literal>full-upgrade</literal> command is less conservative.)
zh_CN: （使用 <literal>upgrade</literal> 命令升级时，如果为了满足新的依赖关系需要安装额外的软件包，则会保留软件包的旧版本。<literal>full-upgrade</literal> 命令则没有那么保守。）

note: type: Content of: <chapter><section><section><para>
en: Note that you must be logged in as root to perform any commands that modify packages.
zh_CN: 注意您需要以 root 用户登录才可以执行修改软件包的命令。

note: type: Content of: <chapter><section><section><para>
en: Note that <command>apt-get</command> now also installs recommended packages as default, and thanks to its robustness it's the preferred program for package management from console to perform system installation and major system upgrades.
zh_CN: 注意 <command>apt-get</command> 现在默认会安装推荐的软件包，另外由于它的鲁棒性，它也是在命令行安装系统和进行重大系统升级时首选的软件包管理程序。

note: type: Content of: <chapter><section><section><para>
en: The apt tool suite also includes the <command>apt-cache</command> tool to query the package lists.  You can use it to find packages providing specific functionality through simple text or regular expression queries and through queries of dependencies in the package management system.  Some common ways to use <command>apt-cache</command> are:
zh_CN: apt 工具集也包含了 <command>apt-cache</command> 工具，可以查询软件包列表。您可以用它在软件包管理系统中通过简单的文本或正则表达式查询，或者依赖关系查询来找出提供特定功能的软件包。使用 <command>apt-cache</command> 的常见方式有：

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: To find packages whose description contain <replaceable>word</replaceable>:
zh_CN: 要找出描述中包含<replaceable>词语</replaceable>的软件包：

note: type: Content of: <chapter><section><section><itemizedlist><listitem><screen>
en: apt search <replaceable>word</replaceable>
zh_CN: apt search <replaceable>词语</replaceable>

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: To print the detailed information of a package:
zh_CN: 要打印软件包的详细信息：

note: type: Content of: <chapter><section><section><itemizedlist><listitem><screen>
en: apt show <replaceable>package</replaceable>
zh_CN: apt show <replaceable>软件包</replaceable>

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: To print the packages a given package depends on:
zh_CN: 要打印软件包的依赖：

note: type: Content of: <chapter><section><section><itemizedlist><listitem><screen>
en: apt-cache depends <replaceable>package</replaceable>
zh_CN: apt-cache depends <replaceable>软件包</replaceable>

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: To print detailed information on the versions available for a package and the packages that reverse-depends on it:
zh_CN: 要打印软件包各可用版本的详细信息，以及反向依赖它的软件包：

note: type: Content of: <chapter><section><section><itemizedlist><listitem><screen>
en: apt-cache showpkg <replaceable>package</replaceable>
zh_CN: apt-cache showpkg <replaceable>软件包</replaceable>

note: type: Content of: <chapter><section><section><para>
en: For more information, install the <systemitem role="package">apt</systemitem> package and read <citerefentry><refentrytitle>apt</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>apt-get</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>sources.list</refentrytitle><manvolnum>5</manvolnum></citerefentry> and install the <systemitem role="package">apt-doc</systemitem> package and read <filename>/usr/share/doc/apt-doc/guide.html/index.html</filename>.
zh_CN: 欲了解更多信息，请安装 <systemitem role="package">apt</systemitem> 软件包，并阅读 <citerefentry><refentrytitle>apt</refentrytitle><manvolnum>8</manvolnum></citerefentry>、<citerefentry><refentrytitle>apt-get</refentrytitle><manvolnum>8</manvolnum></citerefentry>、<citerefentry><refentrytitle>sources.list</refentrytitle><manvolnum>5</manvolnum></citerefentry>，并安装 <systemitem role="package">apt-doc</systemitem> 软件包，并阅读 <filename>/usr/share/doc/apt-doc/guide.html/index.html</filename>。

note: type: Content of: <chapter><section><section><para>
en: <command>aptitude</command> is a package manager for &debian; systems that provides a frontend to the apt package management infrastructure.  <command>aptitude</command> is a text-based interface using the curses library.  Actions may be performed from a visual interface or from the command-line.
zh_CN: <command>aptitude</command> 是 &debian; 系统的一个软件包管理器，是 apt 包管理器的一个前端。<command>aptitude</command> 是一个文本界面，使用 curses 库。可以通过视觉界面或命令行执行操作。

note: type: Content of: <chapter><section><section><para>
en: <command>aptitude</command> can be used to perform management tasks in a fast and easy way.  It allows the user to view the list of packages and to perform package management tasks such as installing, upgrading, and removing packages.
zh_CN: <command>aptitude</command> 让用户可以方便快捷地完成软件包管理任务。它允许用户查看软件包列表，并执行软件包管理任务，例如安装、升级和卸载软件包。

note: type: Content of: <chapter><section><section><para>
en: <command>aptitude</command> provides the functionality of <command>apt-get</command>, as well as many additional features:
zh_CN: <command>aptitude</command> 提供了 <command>apt-get</command> 的功能，以及许多额外的功能：

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: <command>aptitude</command> offers easy access to all versions of a package.
zh_CN: <command>aptitude</command> 可以方便地访问软件包的所有版本。

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: <command>aptitude</command> makes it easy to keep track of obsolete software by listing it under "Obsolete and Locally Created Packages".
zh_CN: <command>aptitude</command> 将过时的软件包列于“过期的和在本地创建的软件包”下，使跟踪这些软件包变得十分容易。

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: <command>aptitude</command> includes a fairly powerful system for searching particular packages and limiting the package display.  Users familiar with <command>mutt</command> will pick up quickly, as <command>mutt</command> was the inspiration for the expression syntax.
zh_CN: <command>aptitude</command> 包含了一个强大的搜索软件包和限制所显示的软件包的机制。熟悉 <command>mutt</command> 的用户会很容易上手，因为 <command>mutt</command> 是该机制中表达式的语法的来源。

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: <command>aptitude</command> can be used to install the predefined tasks available.  For more information see <xref linkend="tasksel"/>.
zh_CN: <command>aptitude</command> 可以用于安装预定义的任务。更多信息，请见<xref linkend="tasksel"/>。

note: type: Content of: <chapter><section><section><itemizedlist><listitem><para>
en: <command>aptitude</command> in full screen mode has <command>su</command> functionality embedded and can be run by a normal user.  It will call <command>su</command> (and ask for the root password, if any) when you really need administrative privileges.
zh_CN: <command>aptitude</command> 在全屏模式下内置 <command>su</command> 功能，所以可以以普通用户执行。当确实需要管理员权限时，它会调用 <command>su</command>（并询问 root 密码，如果有的话）。

note: type: Content of: <chapter><section><section><para>
en: You can use <command>aptitude</command> through a visual interface (simply run <literal>aptitude</literal>) or directly from the command line.  The command line syntax used is very similar to the one used in <command>apt-get</command>.  For example, to install the <replaceable>foo</replaceable> package, you can run <literal>aptitude install <replaceable>foo</replaceable></literal>.
zh_CN: 您可以使用 <command>aptitude</command> 的视觉界面（只需简单地运行 <literal>aptitude</literal>），或者直接从命令行调用。命令行语法和 <command>apt-get</command> 很相似。例如，要安装 <replaceable>foo</replaceable> 软件包，您可以运行 <literal>aptitude install <replaceable>foo</replaceable></literal>。

note: type: Content of: <chapter><section><section><para>
en: Note that <command>aptitude</command> is the preferred program for daily package management from the console.
zh_CN: 注意 <command>aptitude</command> 是在命令行进行日常软件包管理的首选程序。

note: type: Content of: <chapter><section><section><para>
en: For more information, read the manual page <citerefentry><refentrytitle>aptitude</refentrytitle><manvolnum>8</manvolnum></citerefentry> and install the <systemitem role="package">aptitude-doc</systemitem> package.
zh_CN: 更多信息，请阅读 <citerefentry><refentrytitle>aptitude</refentrytitle><manvolnum>8</manvolnum></citerefentry> 手册页，并安装 <systemitem role="package">aptitude-doc</systemitem> 软件包。

note: type: Content of: <chapter><section><section><para>
en: <command>synaptic</command> is a graphical package manager.  It enables you to install, upgrade and remove software packages in a user friendly way.  Along with most of the features offered by aptitude, it also has a feature for editing the list of used repositories, and supports browsing all available documentation related to a package.  See the <ulink url="https://www.nongnu.org/synaptic/">Synaptic Website</ulink> for more information.
zh_CN: <command>synaptic</command> 是一个图形化的软件包管理器。它能够以用户友好的方式安装、升级和卸载软件包。除了提供 aptitude 提供的大多数功能之外，它的功能还包括编辑正在使用的软件仓库列表，以及浏览和软件包相关的所有文档。访问 <ulink url="https://www.nongnu.org/synaptic/">Synaptic 网站</ulink>以获得更多信息。

note: type: Content of: <chapter><section><section><para>
en: When you want to perform a specific task it might be difficult to find the appropiate suite of packages that fill your need.  The Debian developers have defined <literal>tasks</literal>, a task is a collection of several individual Debian packages all related to a specific activity.  Tasks can be installed through the <command>tasksel</command> program or through <command>aptitude</command>.
zh_CN: 当您希望完成特定的任务时，寻找符合您需要的软件包的组合可能会很困难。Debian 开发者定义了不同的<literal>任务（task）</literal>，它指的是与特定的任务有关的 Debian 软件包的组合。可以使用 <command>tasksel</command> 或 <command>aptitude</command> 安装任务。

note: type: Content of: <chapter><section><section><para>
en: Typically, the Debian installer will automatically install the task associated with a standard system and a desktop environment.  The specific desktop environment installed will depend on the CD/DVD media used, most commonly it will be the GNOME desktop (<literal>gnome-desktop</literal> task).  Also, depending on your selections throughout the installation process, tasks might be automatically installed in your system.  For example, if you selected a language other than English, the task associated with it will be installed automatically too.
zh_CN: 通常，Debian 安装程序会自动安装与标准系统和桌面环境有关的任务。安装的桌面环境和 CD/DVD 有关，一般是 GNOME 桌面（<literal>gnome-desktop</literal> 任务）。另外，根据您在安装过程中的选择，可能还会自动安装一些任务。比如说，如果您选择了除英语以外的语言，则还会自动安装和该语言有关的任务。

note: type: Content of: <chapter><section><section><title>
en: Other package management tools
zh_CN: 其他软件包管理工具

note: type: Content of: <chapter><section><section><section><para>
en: This program manipulates Debian archive (<literal>.deb</literal>) files.  Some common uses are:
zh_CN: 该程序可以处理 Debian 档案（<literal>.deb</literal>）文件。常见的用法有：

note: type: Content of: <chapter><section><section><section><itemizedlist><listitem><para>
en: Find out all the options: <literal>dpkg-deb --help</literal>.
zh_CN: 列出所有选项：<literal>dpkg-deb --help</literal>。

note: type: Content of: <chapter><section><section><section><itemizedlist><listitem><para>
en: Determine what files are contained in a Debian archive file: <literal>dpkg-deb --contents foo_VVV-RRR.deb</literal>
zh_CN: 列出 Debian 档案文件中包含的文件：<literal>dpkg-deb --contents foo_VVV-RRR.deb</literal>。

note: type: Content of: <chapter><section><section><section><itemizedlist><listitem><para>
en: Extract the files contained in a named Debian archive into a user specified directory: <literal>dpkg-deb --extract foo_VVV-RRR.deb tmp</literal> extracts each of the files in <literal>foo_VVV-RRR.deb</literal> into the directory <literal>tmp/</literal>.  This is convenient for examining the contents of a package in a localized directory, without installing the package into the root file system.
zh_CN: 解压 Debian 档案文件中的文件到用户指定的目录：<literal>dpkg-deb --extract foo_VVV-RRR.deb tmp</literal> 解压 <literal>foo_VVV-RRR.deb</literal> 中的所有文件到 <literal>tmp/</literal> 目录。这样可以在不将软件包安装到根文件系统的情况下，方便地在临时目录查看软件包的内容。

note: type: Content of: <chapter><section><section><section><itemizedlist><listitem><para>
en: Extract the control information files from a package: <literal>dpkg-deb --control foo_VVV-RRR.deb tmp</literal>.
zh_CN: 解压软件包的控制文件：<literal>dpkg-deb --control foo_VVV-RRR.deb tmp</literal>。

note: type: Content of: <chapter><section><section><section><para>
en: Note that any packages that were merely unpacked using <literal>dpkg-deb --extract</literal> will be incorrectly installed, you should use <literal>dpkg --install</literal> instead.
zh_CN: 注意仅使用 <literal>dpkg-deb --extract</literal> 解压的软件包并没有被正确安装，您应当使用 <literal>dpkg --install</literal> 进行安装。

note: type: Content of: <chapter><section><section><section><para>
en: More information is given in the manual page <citerefentry><refentrytitle>dpkg-deb</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
zh_CN: 更多信息请见手册页 <citerefentry><refentrytitle>dpkg-deb</refentrytitle><manvolnum>1</manvolnum></citerefentry>。

note: type: Content of: <chapter><section><title>
en: Debian claims to be able to update a running program; how is this accomplished?
zh_CN: Debian 声称可以更新正在运行的程序，这是怎么做到的？

note: type: Content of: <chapter><section><para>
en: The kernel (file system) in &debian; systems supports replacing files even while they're being used.
zh_CN: &debian; 系统的内核（文件系统）支持替换正在使用的文件。

note: type: Content of: <chapter><section><para>
en: We also provide a program called <command>start-stop-daemon</command> which is used to start daemons at boot time or to stop daemons when the runlevel is changed (e.g., from multi-user to single-user or to halt).  The same program is used by installation scripts when a new package containing a daemon is installed, to stop running daemons, and restart them as necessary.
zh_CN: 我们也提供了一个名为 <command>start-stop-daemon</command> 的程序，可以在运行级别改变时（例如从多用户模式切换到单用户模式，或者关机时）启动或停止守护进程。该程序也会在安装含有守护进程的软件包时被安装脚本执行，以停止正在运行的守护进程，并在需要时重启它们。

note: type: Content of: <chapter><section><title>
en: How can I tell what packages are already installed on a Debian system?
zh_CN: 怎么知道 Debian 系统中安装了哪些软件包？

note: type: Content of: <chapter><section><para>
en: To learn the status of all the packages installed on a Debian system, execute the command
zh_CN: 要知道 Debian 系统中安装的所有软件包的状态，请执行

note: type: Content of: <chapter><section><para>
en: This prints out a one-line summary for each package, giving a 2-letter status symbol (explained in the header), the package name, the version which is <emphasis>installed</emphasis>, and a brief description.
zh_CN: 这会对每个软件包打印一行概览，包括两个字母的状态符号（在表头中有解释）、软件包名、<emphasis>已安装</emphasis>的版本，以及一行简短的描述。

note: type: Content of: <chapter><section><para>
en: To learn the status of packages whose names match any pattern beginning with "foo", run the command:
zh_CN: 欲了解包名与以“foo”开头的任意模式匹配的软件包的状态，请执行：

note: type: Content of: <chapter><section><para>
en: To get a more verbose report for a particular package, execute the command:
zh_CN: 要获得特定软件包的更详细报告，请执行：

note: type: Content of: <chapter><section><screen>
en: dpkg --status packagename
zh_CN: dpkg --status 软件包名

note: type: Content of: <chapter><section><title>
en: How do I display the files of an installed package?
zh_CN: 如何显示已安装的软件包包含的文件？

note: type: Content of: <chapter><section><para>
en: To list all the files provided by the installed package <literal>foo</literal> execute the command
zh_CN: 要列出已安装的软件包 <literal>foo</literal> 提供的所有文件，请执行

note: type: Content of: <chapter><section><para>
en: Note that the files created by the installation scripts aren't displayed.
zh_CN: 注意，不会显示软件包的安装脚本所创建的文件。

note: type: Content of: <chapter><section><title>
en: How can I find out what package produced a particular file?
zh_CN: 如何查出一个特定的文件属于哪个软件包？

note: type: Content of: <chapter><section><para>
en: To identify the package that produced the file named <literal>foo</literal> execute either:
zh_CN: 要获得名为 <literal>foo</literal> 的文件所属的软件包，可选择以下命令中的一个：

note: type: Content of: <chapter><section><itemizedlist><listitem><para>
en: This searches for <literal>foo</literal> in installed packages.  (This is (currently) equivalent to searching all of the files having the file extension of <literal>.list</literal> in the directory <literal>/var/lib/dpkg/info/</literal>, and adjusting the output to print the names of all the packages containing it, and diversions.)
zh_CN: 这会在已安装的软件包中搜索 <literal>foo</literal>。（目前，该命令等价于在 <literal>/var/lib/dpkg/info/</literal> 目录中所有扩展名为 <literal>.list</literal> 的文件里进行搜索，并调整输出，以打印软件包名和文件路径。）

note: type: Content of: <chapter><section><itemizedlist><listitem><para>
en: A faster alternative to this is the <command>dlocate</command> tool.
zh_CN: 另一个更快的方法是使用 <command>dlocate</command> 工具。

note: type: Content of: <chapter><section><itemizedlist><listitem><para>
en: This searches for files which contain the substring <literal>foo</literal> in their full path names.  The files <literal>Contents-ARCH.gz</literal> (where ARCH represents the wanted architecture) reside in the major package directories (main, non-free, contrib) at a Debian archive site (i.e. under <literal>/debian/dists/&releasename;</literal>).  A <literal>Contents</literal> file refers only to the packages in the subdirectory tree where it resides.  Therefore, a user might have to search more than one <literal>Contents</literal> files to find the package containing the file <literal>foo</literal>.
zh_CN: 这会找出所有完整路径名中含有子串 <literal>foo</literal> 的文件。文件 <literal>Contents-ARCH.gz</literal>（其中 ARCH 为所需的架构）位于 Debian 档案站点（即 <literal>/debian/dists/&releasename;</literal> 中）的主要软件包目录（main、non-free、contrib）内。一个 <literal>Contents</literal> 文件仅包含它所处的子目录树的软件包。所以，用户可能需要搜索不止一个 <literal>Contents</literal> 文件，才能找到含有文件 <literal>foo</literal> 的软件包。

note: type: Content of: <chapter><section><itemizedlist><listitem><para>
en: This method has the advantage over <literal>dpkg --search</literal> in that it will find files in packages that are not currently installed on your system.
zh_CN: 这个方法相比于 <literal>dpkg --search</literal> 的优点是可以找到未在您的系统上安装的软件包的文件。

note: type: Content of: <chapter><section><itemizedlist><listitem><para>
en: If you install the <systemitem role="package">apt-file</systemitem> package, similar to the above, it searches files which contain the substring or regular expression <literal>foo</literal> in their full path names.  The advantage over the example above is that there is no need to retrieve the <literal>Contents-ARCH.gz</literal> files as it will do this automatically for all the sources defined in <filename>/etc/apt/sources.list</filename> when you run (as root) <literal>apt-file update</literal>.
zh_CN: 如果您安装了 <systemitem role="package">apt-file</systemitem> 软件包，和上一个类似，它可以找到完整路径名中含有子串或正则表达式 <literal>foo</literal> 的文件。该命令相比于上一个的优点是不需要手动下载 <literal>Contents-ARCH.gz</literal> 文件，因为当您（以 root 用户）执行 <literal>apt-file update</literal> 时，它会自动对 <filename>/etc/apt/sources.list</filename> 中定义的所有软件源执行该操作。

note: type: Content of: <chapter><section><title>
en: Why is "foo-data" not removed when I uninstall "foo"? How do I make sure old unused library-packages get purged?
zh_CN: 为什么我卸载“foo”的时候没有卸载“foo-data”？怎样确保旧的、不再使用的库软件包被卸载？

note: type: Content of: <chapter><section><para>
en: Some packages are split in program ("foo") and data ("foo-data") (or in "foo" and "foo-doc").  This is true for many games, multimedia applications and dictionaries in Debian and has been introduced since some users might want to access the raw data without installing the program or because the program can be run without the data itself, making "foo-data" optional.
zh_CN: 有些软件包被分割成程序（“foo”）和数据（“foo-data”）（或者“foo”和“foo-doc”）。Debian 中的许多游戏、多媒体应用和词典都是这种情况。这样做的原因是有的用户可能只想访问原始数据，而不想安装程序，或者是因为有的程序不需要数据就可以运行，所以“foo-data”是可选的。

note: type: Content of: <chapter><section><para>
en: Similar situations occur when dealing with libraries: generally these get installed since packages containing applications depend on them.  When the application-package is purged, the library-package might stay on the system.  Or: when the application-package no longer depends upon e.g. libdb4.2, but upon libdb4.3, the libdb4.2 package might stay when the application-package is upgraded.
zh_CN: 对于库而言，也有类似的状况：通常，安装这些库是因为有个包含应用程序的软件包依赖它。当应用程序软件包被卸载时，库软件包可能留在系统中。或者：比如应用程序软件包不再依赖 libdb4.2，而开始依赖 libdb4.3 时，在升级该应用程序软件包时，libdb4.2 可能仍留在系统中。

note: type: Content of: <chapter><section><para>
en: In these cases, "foo-data" doesn't depend on "foo", so when you remove the "foo" package it will not get automatically removed by most package management tools.  The same holds true for the library packages.  This is necessary to avoid circular dependencies.  However, if you use <command>apt-get</command> (see <xref linkend="apt-get"/>) or <command>aptitude</command> (see <xref linkend="aptitude"/>) as your package management tool, they will track automatically installed packages and give the possibility to remove them, when no packages making use of them remain in your system.
zh_CN: 在这些情况下，“foo-data”不依赖“foo”，所以当您卸载“foo”软件包时，大多数软件包管理工具不会卸载“foo-data”。库软件包也是同理。必须这样处理以避免循环依赖。然而，如果您使用的软件包管理工具是 <command>apt-get</command>（参见<xref linkend="apt-get"/>）或 <command>aptitude</command>（参见<xref linkend="aptitude"/>），它们会跟踪自动安装的软件包，并在没有其他软件包使用它们的情况下，允许您卸载这些软件包。
