0 - en to zh-TW translation catalogue (174 entries)

en: Binary package
zh-TW: 執行檔套件

en: Source package
zh-TW: 原始檔套件

en: dependencies
zh-TW: 相依性

en: conflict
zh-TW: 衝突

en: Packaging System: Tools and Fundamental Principles
zh-TW: 套件系統：工具與基本原則

en: As a Debian system administrator, you will routinely handle <filename>.deb</filename> packages, since they contain consistent functional units (applications, documentation, etc.), whose installation and maintenance they facilitate. It is therefore a good idea to know what they are and how to use them.
zh-TW: 身為 Debian 系統管理員，經常處理 <filename>.deb</filename> 套件，因為含有一致的功能單元 (應用程式、文件等)，強化安裝與維護工作。所以能夠瞭解它們是什麼與如何使用是應該的。

en: Structure of a Binary Package
zh-TW: 執行檔套件的結構

en: <emphasis>TOOLS</emphasis> <command>dpkg</command>, <command>APT</command> and <command>ar</command>
zh-TW: <emphasis>工具</emphasis> <command>dpkg</command>、<command>APT</command> 與 <command>ar</command>

en: <primary>unpacking</primary><secondary>binary package</secondary>
zh-TW: <primary>解壓</primary><secondary>執行套件</secondary>

en: <emphasis>BACK TO BASICS</emphasis> Man page notation
zh-TW: <emphasis>基礎</emphasis> Man 手冊註記

en: It can be confusing for beginners to find references to “<citerefentry><refentrytitle>ar</refentrytitle><manvolnum>1</manvolnum></citerefentry>” in the literature. This is generally a convenient means of referring to the man page entitled <literal>ar</literal> in section 1.
zh-TW: 初學者不太容易找到 “<citerefentry><refentrytitle>ar</refentrytitle><manvolnum>1</manvolnum></citerefentry>” 的參考資料。實際上祗需進入 man 頁面第 1 區的 <literal>ar</literal>。

en: Sometimes this notation is also used to remove ambiguities, for example to distinguish between the <command>printf</command> command that can also be indicated by <citerefentry><refentrytitle>printf</refentrytitle><manvolnum>1</manvolnum></citerefentry> and the <function>printf</function> function in the C programming language, which can also be referred to as <citerefentry><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
zh-TW: 有時，此註記也用來消除模棱兩可，例如 <command>printf</command> 命令可能指的是 <citerefentry><refentrytitle>printf</refentrytitle><manvolnum>1</manvolnum></citerefentry> 與 C 程式語言的 <function>printf</function> 函數，指的是 <citerefentry><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>。

en: <xref linkend="solving-problems" /> discusses manual pages in further detail (see <xref linkend="sect.manual-pages" />).
zh-TW: <xref linkend="solving-problems" /> 討論手冊的詳情 (見 <xref linkend="sect.manual-pages" />)。

en: Have a look at the content of a <filename>.deb</filename> file:
zh-TW: 查看 <filename>.deb</filename> 檔案的內容：

en: As you can see, the <command>ar</command> archive of a Debian package is comprised of three files:
zh-TW: 如您所見，Debian 套件的 <command>ar</command> 包括以下三個檔案：

en: Package Meta-Information
zh-TW: 軟體套件中介資訊

en: <primary>package</primary><secondary>meta-information</secondary>
zh-TW: <primary>套件</primary><secondary>中介資訊</secondary>

en: Description: the <filename>control</filename> File
zh-TW: 描述：<filename>control</filename> 檔案

en: <primary>package meta-information</primary>
zh-TW: <primary>套件中介資訊</primary>

en: <emphasis>BACK TO BASICS</emphasis> RFC — Internet standards
zh-TW: <emphasis>基礎</emphasis> RFC — 網際網路標準

en: RFC 2026 defines the process for standardization of Internet protocols. <ulink type="block" url="http://www.faqs.org/rfcs/rfc2026.html" />
zh-TW: RFC 2026 定義網際網路協定標準化的程序。<ulink type="block" url="http://www.faqs.org/rfcs/rfc2026.html" />

en: Dependencies: the <literal>Depends</literal> Field
zh-TW: 相依性：<literal>依賴</literal> 欄位

en: <primary>dependency</primary>
zh-TW: <primary>相依</primary>

en: <primary>package</primary><secondary>dependency</secondary>
zh-TW: <primary>套件</primary><secondary>相依</secondary>

en: <command>&lt;&lt;</command>: less than;
zh-TW: <command>&lt;&lt;</command>：小於；

en: <command>&lt;=</command>: less than or equal to;
zh-TW: <command>&lt;=</command>：小於或等於；

en: <command>=</command>: equal to (note that “<literal>2.6.1</literal>” is not equal to “<literal>2.6.1-1</literal>”);
zh-TW: <command>=</command>：等於 (“<literal>2.6.1</literal>” 不等於 “<literal>2.6.1-1</literal>”)；

en: <command>&gt;=</command>: greater than or equal to;
zh-TW: <command>&gt;=</command>：大於或等於；

en: <command>&gt;&gt;</command>: greater than.
zh-TW: <command>&gt;&gt;</command>：大於。

en: <emphasis>DEBIAN POLICY</emphasis> <literal>Recommends</literal>, <literal>Suggests</literal>, and <literal>Enhances</literal> fields
zh-TW: <emphasis>DEBIAN 政策</emphasis> <literal>推薦</literal>、<literal>建議</literal>、與 <literal>強化</literal> 欄位

en: The <literal>Recommends</literal> and <literal>Suggests</literal> fields describe dependencies that are not compulsory. The “recommended” dependencies, the most important, considerably improve the functionality offered by the package but are not indispensable to its operation. The “suggested” dependencies, of secondary importance, indicate that certain packages may complement and increase their respective utility, but it is perfectly reasonable to install one without the others.
zh-TW: <literal>推薦</literal> 與 <literal>建議</literal> 欄位描述非強制性的相依。“推薦” 相依性是最重要的，改善套件提供的功能但不是運作的必要部份。“建議” 相依性是次重要的，指出套件可能補充與增加其功能，但仍可以在不安裝其他套件的情況安裝它。

en: The <literal>Enhances</literal> field also describes a suggestion, but in a different context. It is indeed located in the suggested package, and not in the package that benefits from the suggestion. Its interest lies in that it is possible to add a suggestion without having to modify the package that is concerned. Thus, all add-ons, plug-ins, and other extensions of a program can then appear in the list of suggestions related to the software. Although it has existed for several years, this last field is still largely ignored by programs such as <command>apt</command> or <command>synaptic</command>. Its purpose is for a suggestion made by the <literal>Enhances</literal> field to appear to the user in addition to the traditional suggestions — found in the <literal>Suggests</literal> field.
zh-TW: <literal>Enhances</literal> 欄位也描述建議，但是位於不同的內文。實際上位於建議套件內，而不是受益於建議的套件內。有可能在不修改套件的前提下新增建議。因此所有插件、外掛與其他的程式延伸可以顯示在與軟體相關的建議清單內。雖然已存在多年，但是 <command>apt</command> 或 <command>synaptic</command> 等程式依然忽略此欄位的存在。<literal>Enhances</literal> 欄位提出的建議係在傳統建議 — <literal>Suggests</literal> 欄位供使用者參考。

en: <emphasis>DEBIAN POLICY</emphasis> <literal>Pre-Depends</literal>, a more demanding <literal>Depends</literal>
zh-TW: <emphasis>DEBIAN 政策</emphasis> <literal>預相依</literal>，更苛刻的 <literal>相依</literal>

en: <primary>pre-dependency</primary>
zh-TW: <primary>預相依</primary>

en: “Pre-dependencies”, which are listed in the “<literal>Pre-Depends</literal>” field in the package headers, complete the normal dependencies; their syntax is identical. A normal dependency indicates that the package in question must be unpacked and configured before configuration of the package declaring the dependency. A pre-dependency stipulates that the package in question must be unpacked and configured before execution of the pre-installation script of the package declaring the pre-dependency, that is before its installation.
zh-TW: “預相依性”，列在套件標頭的 “<literal>Pre-Depends</literal>” 欄位，滿足完整的正常相依性；它的語法是相同的。正常相依性係指必須在宣告相依性前先解開並組態的問題套件。預相依性規定在執行套件的預安裝腳本前，必須先解開並組態套件，就是在安裝之前。

en: Conflicts: the <literal>Conflicts</literal> field
zh-TW: 衝突： <literal>Conflicts</literal> 欄位

en: <primary>conflicts</primary>
zh-TW: <primary>衝突</primary>

en: <primary>package</primary><secondary>conflict</secondary>
zh-TW: <primary>套件</primary><secondary>conflict</secondary>

en: <command>dpkg</command> will refuse to install a package if it triggers a conflict with an already installed package, except if the new package specifies that it will “replace” the installed package, in which case <command>dpkg</command> will choose to replace the old package with the new one. <command>apt</command> always follows your instructions: if you choose to install a new package, it will automatically offer to uninstall the package that poses a problem.
zh-TW: <command>dpkg</command> 不會安裝衝突的套件，除非新套件指明 “取代” 被衝突的套件，<command>dpkg</command> 才會以新的套件取代舊的套件。<command>apt</command> 總是遵循您的指示：若選擇安裝新套件，則自動移除造成問題的舊套件。

en: Incompatibilities: the <literal>Breaks</literal> Field
zh-TW: 不相容：<literal>Breaks</literal> 欄位

en: <primary>incompatibilities</primary>
zh-TW: <primary>不相容</primary>

en: <primary>package</primary><secondary>incompatibility</secondary>
zh-TW: <primary>套件</primary><secondary>不相容</secondary>

en: The <literal>Breaks</literal> field has an effect similar to that of the <literal>Conflicts</literal> field, but with a special meaning. It signals that the installation of a package will “break” another package (or particular versions of it). In general, this incompatibility between two packages is transitory, and the <literal>Breaks</literal> relationship specifically refers to the incompatible versions.
zh-TW: <literal>Breaks</literal> 欄位的影響類似於 <literal>Conflicts</literal> 欄位，但具有特殊的意義。指出安裝一個套件將 “中斷” 另個套件 (或特別版本的套件)。通常而言，兩個套件的不相容是短暫的，且 <literal>Breaks</literal> 關係係指不相容的特定版本。

en: <command>dpkg</command> will refuse to install a package that breaks an already installed package, and <command>apt</command> will try to resolve the problem by updating the package that would be broken to a newer version (which is assumed to be fixed and, thus, compatible again).
zh-TW: 已經中斷現有套件時，<command>dpkg</command> 將拒絕安裝並且 <command>apt</command> 將更新套件至新的版本試圖解決此問題 (通常可解決此問題，並再度相容)。

en: This type of situation may occur in the case of updates without backwards compatibility: this is the case if the new version no longer functions with the older version, and causes a malfunction in another program without making special provisions. The <literal>Breaks</literal> field prevents the user from running into these problems.
zh-TW: 此狀況可能發生在未向下相容的昇級：新版本不再與舊版本相容，沒有特別安排將造成故障。<literal>Breaks</literal> 欄位避免使用者進入此問題。

en: Provided Items: the <literal>Provides</literal> Field
zh-TW: 提供項目：<literal>Provides</literal> 欄位

en: This field introduces the very interesting concept of a “virtual package”. It has many roles, but two are of particular importance. The first role consists in using a virtual package to associate a generic service with it (the package “provides” the service). The second indicates that a package completely replaces another, and that for this purpose it can also satisfy the dependencies that the other would satisfy. It is thus possible to create a substitution package without having to use the same package name.
zh-TW: 這個欄位引進有趣的 “虛擬套件” 概念。它有很多角色，其中兩個特別重要。第一個是以虛擬套件關連至一個通用的服務 (此套件 “提供” 此服務)。第二個是指出此套件完全取代另個套件，它也能滿足相依性的要求。因此，可能建立替代套件而不必使用相同名稱的套件。

en: <emphasis>VOCABULARY</emphasis> Meta-package and virtual package
zh-TW: <emphasis>術語</emphasis> 中介套件與虛擬套件

en: <primary>package</primary><secondary>virtual package</secondary>
zh-TW: <primary>套件</primary><secondary>虛擬套件</secondary>

en: <primary>virtual package</primary>
zh-TW: <primary>虛擬套件</primary>

en: It is essential to clearly distinguish meta-packages from virtual packages. The former are real packages (including real <filename>.deb</filename> files), whose only purpose is to express dependencies.
zh-TW: 必須從虛擬套件中明確的分離出中介套件。後者是真實的套件 (包括真實的 <filename>.deb</filename> 檔案)，其唯一目的是用來表示其相依性。

en: Virtual packages, however, do not exist physically; they are only a means of identifying real packages based on common, logical criteria (service provided, compatibility with a standard program or a pre-existing package, etc.).
zh-TW: 然而，虛擬套件並未真實的存在；祗是依照通用、邏輯範圍 (提供的服務、相容於標準程式或已存在的套件等) 辨認真實套件的手段。

en: Providing a “Service”
zh-TW: 提供 “服務”

en: Let us discuss the first case in greater detail with an example: all mail servers, such as <emphasis role="pkg">postfix</emphasis> or <emphasis role="pkg">sendmail</emphasis> are said to “provide” the <emphasis role="pkg">mail-transport-agent</emphasis> virtual package. Thus, any package that needs this service to be functional (e.g. a mailing list manager, such as <emphasis role="pkg">smartlist</emphasis> or <emphasis role="pkg">sympa</emphasis>) simply states in its dependencies that it requires a <emphasis role="pkg">mail-transport-agent</emphasis> instead of specifying a large yet incomplete list of possible solutions (e.g. <command>postfix | sendmail | exim4 | …</command>). Furthermore, it is useless to install two mail servers on the same machine, which is why each of these packages declares a conflict with the <emphasis role="pkg">mail-transport-agent</emphasis> virtual package. A conflict between a package and itself is ignored by the system, but this technique will prohibit the installation of two mail servers side by side.
zh-TW: 讓我們以範例詳述第一個案子：<emphasis role="pkg">postfix</emphasis> 或 <emphasis role="pkg">sendmail</emphasis> 之類的郵件伺服器都 “提供” <emphasis role="pkg">mail-transport-agent</emphasis> 虛擬套件。因此需要啟用該等服務的套件 (如：<emphasis role="pkg">smartlist</emphasis> 或 <emphasis role="pkg">sympa</emphasis> 之類的郵寄名單管理器) 祗要在其相依性裡敘明需要 <emphasis role="pkg">mail-transport-agent</emphasis> 而不是指明還不相容的可能解決方案清單 (如 <command>postfix | sendmail | exim4 | …</command>)。更進一步來說，在同個機器安裝兩個郵件伺服器是沒有用的，因此每個套件都聲明與 <emphasis role="pkg">mail-transport-agent</emphasis> 虛擬套件衝突。系統忽略衝突的兩個套件，但技術上可以禁止同時安裝兩個郵件伺服器。

en: <emphasis>DEBIAN POLICY</emphasis> List of virtual packages
zh-TW: <emphasis>DEBIAN 政策</emphasis> 虛擬套件清單

en: For virtual packages to be useful, everyone must agree on their name. This is why they are standardized in the Debian Policy. The list includes among others <emphasis role="pkg">mail-transport-agent</emphasis> for mail servers, <emphasis role="pkg">c-compiler</emphasis> for C programming language compilers, <emphasis role="pkg">www-browser</emphasis> for web browsers, <emphasis role="pkg">httpd</emphasis> for web servers, <emphasis role="pkg">ftp-server</emphasis> for FTP servers, <emphasis role="pkg">x-terminal-emulator</emphasis> for terminal emulators in graphical mode (<command>xterm</command>), and <emphasis role="pkg">x-window-manager</emphasis> for window managers.
zh-TW: 使用虛擬套件時，每個人都必須同意其名稱。這就是在 Debian 政策內把他們標準化的原因。此清單包括郵件伺服器 <emphasis role="pkg">mail-transport-agent</emphasis>、C 語文編譯器 <emphasis role="pkg">c-compiler</emphasis>、網頁瀏覽器 <emphasis role="pkg">www-browser</emphasis>、網頁伺服器 <emphasis role="pkg">httpd</emphasis>、FTP 伺服器 <emphasis role="pkg">ftp-server</emphasis>、圖形模式終端機模擬器 <emphasis role="pkg">x-terminal-emulator</emphasis> (<command>xterm</command>)、以及視窗管理員 <emphasis role="pkg">x-window-manager</emphasis>。

en: Interchangeability with Another Package
zh-TW: 與另個套件的交換性

en: Use of a <literal>Provides</literal> field in order to not break dependencies
zh-TW: 使用 <literal>Provides</literal> 欄位以避免中斷相依性

en: This feature is very useful, since it is never possible to anticipate the vagaries of development, and it is necessary to be able to adjust to renaming, and other automatic replacement, of obsolete software.
zh-TW: 此功能極有用，因為它永遠不可能預料變化莫測的發展，也不能重新命名、或者自動替換過時的軟體。

en: <emphasis>BACK TO BASICS</emphasis> Perl, a programming language
zh-TW: <emphasis>基本</emphasis> Perl，程式語言

en: Since it is an interpreted language, a program written in Perl does not require compilation prior to execution. This is why they are called “Perl scripts”.
zh-TW: 因為它是解譯語言，Perl 寫成的程式在執行前不需要編譯。所以也被稱為 “Perl 腳本”。

en: Past Limitations
zh-TW: 過去的限制

en: Replacing Files: The <literal>Replaces</literal> Field
zh-TW: 取代檔案：<literal>Replaces</literal> 欄位

en: <primary>replacement</primary>
zh-TW: <primary>取代</primary>

en: <primary>package</primary><secondary>replacement</secondary>
zh-TW: <primary>套件</primary><secondary>取代</secondary>

en: The use of this field is justified when package names change or when a package is included in another. This also happens when the maintainer decides to distribute files differently among various binary packages produced from the same source package: a replaced file no longer belongs to the old package, but only to the new one.
zh-TW: 套件變更名稱或被包入其他套件時，就可合理地使用此欄位。這種情況也發生在維護者從相同的原始碼套件的執行套件中分離出檔案：被取代的檔案不再屬於舊的套件，祗屬於新的套件。

en: If all of the files in an installed package have been replaced, the package is considered to be removed. Finally, this field also encourages <command>dpkg</command> to remove the replaced package where there is a conflict.
zh-TW: 已安裝套件內的所有檔案都被取代後，就該移除此套件。最後，此欄位亦鼓勵 <command>dpkg</command> 移除衝突的被取代套件。

en: <emphasis>GOING FURTHER</emphasis> The <literal>Tag</literal> field
zh-TW: <emphasis>進一步</emphasis> <literal>Tag</literal> 欄位

en: Configuration Scripts
zh-TW: 組態腳本

en: <emphasis>GOING FURTHER</emphasis> <command>dpkg</command>'s database
zh-TW: <emphasis>進一步</emphasis> <command>dpkg</command> 的資料庫

en: <primary>dpkg</primary><secondary>database</secondary>
zh-TW: <primary>dpkg</primary><secondary>資料庫</secondary>

en: All of the configuration scripts for installed packages are stored in the <filename>/var/lib/dpkg/info/</filename> directory, in the form of a file prefixed with the package's name. This directory also includes a file with the <filename>.list</filename> extension for each package, containing the list of files that belong to that package.
zh-TW: 已安裝套件的所有組態腳本，都以前置套件檔名的方式，儲存在 <filename>/var/lib/dpkg/info/</filename> 資料夾。此資料夾包括每個套件的延伸檔名 <filename>.list</filename>，包括屬於該套件的檔案清單。

en: The <filename>/var/lib/dpkg/status</filename> file contains a series of data blocks (in the format of the famous mail headers, RFC 2822) describing the status of each package. The information from the <filename>control</filename> file of the installed packages is also replicated there.
zh-TW: <filename>/var/lib/dpkg/status</filename> 檔案包括一群資料塊 (以電子郵件標頭方式呈現，RFC 2822) 描述套件的狀態。已安裝套件的 <filename>control</filename> 檔案也複製於此。

en: <emphasis>CAUTION</emphasis> Symbolic names of the scripts
zh-TW: <emphasis>注意</emphasis> 腳本名稱的象徵意義

en: The sequences described in this section call configuration scripts by specific names, such as <command>old-prerm</command> or <command>new-postinst</command>. They are, respectively, the <command>prerm</command> script contained in the old version of the package (installed before the update) and the <command>postinst</command> script contained in the new version (installed by the update).
zh-TW: 本節描述的順序由特別名稱的組態腳本啟用，諸如 <command>old-prerm</command> 或 <command>new-postinst</command>。<command>prerm</command> 腳本是套件的舊版本 (未更新前的)而 <command>postinst</command> 腳本是在新版本 (經由更新安裝) 內。

en: <emphasis>TIP</emphasis> State diagrams
zh-TW: <emphasis>提示</emphasis> 狀態圖

en: Installation and Upgrade
zh-TW: 安裝與升級

en: <primary><command>dpkg</command></primary><secondary>internal operation</secondary>
zh-TW: <primary><command>dpkg</command></primary><secondary>內部運作</secondary>

en: <primary>package</primary><secondary>installation</secondary>
zh-TW: <primary>套件</primary><secondary>安裝</secondary>

en: The new package files are then unpacked. If a file already exists, it is replaced, but a backup copy is temporarily made.
zh-TW: 解開新的套件。取代已存在的檔案，但暫時備份舊檔案。

en: <command>dpkg</command> updates all of the internal data (file list, configuration scripts, etc.) and removes the backups of the replaced files. This is the point of no return: <command>dpkg</command> no longer has access to all of the elements necessary to return to the previous state.
zh-TW: <command>dpkg</command> 升級所有的內部資料 (檔案清單、組態腳本等) 並且移除被取代檔案的備份。這是臨界點：<command>dpkg</command> 不能再近用回復稍早狀態的元素。

en: <command>dpkg</command> will update the configuration files, asking the user to decide if it is unable to automatically manage this task. The details of this procedure are discussed in <xref linkend="sect.conffiles" />.
zh-TW: <command>dpkg</command> 將更新組態檔案，無法自動管理此工作時，要求使用者做決定。詳情在此 <xref linkend="sect.conffiles" />。

en: Package Removal
zh-TW: 移除套件

en: <primary>package</primary><secondary>removal</secondary>
zh-TW: <primary>套件</primary><secondary>移除</secondary>

en: <emphasis>VOCABULARY</emphasis> Purge, a complete removal
zh-TW: <emphasis>術語</emphasis> Purge，完全移除

en: <primary>purging a package</primary>
zh-TW: <primary>清除套件</primary>

en: <primary>package</primary><secondary>purge</secondary>
zh-TW: <primary>套件</primary><secondary>清除</secondary>

en: When a Debian package is removed, the configuration files are retained in order to facilitate possible re-installation. Likewise, the data generated by a daemon (such as the content of an LDAP server directory, or the content of a database for an SQL server) are usually retained.
zh-TW: 移除 Debian 套件時，仍保留組態檔案以備未來可能重新安裝該套件。同樣的，守護進程產生的資料 (諸如 LDAP 伺服器資料夾的內容、或 SQL 伺服器資料庫的內容) 也會被保留。

en: To remove all data associated with a package, it is necessary to “purge” the package with the command, <command>dpkg -P <replaceable>package</replaceable></command>, <command>apt-get remove --purge <replaceable>package</replaceable></command> or <command>aptitude purge <replaceable>package</replaceable></command>.
zh-TW: 移除套件內所有資料，必須以指令 “清除” 該套件，<command>dpkg -P <replaceable>套件</replaceable></command>、<command>apt-get remove --purge <replaceable>套件</replaceable></command> 或 <command>aptitude purge <replaceable>套件</replaceable></command>。

en: Given the definitive nature of such data removals, a purge should not be taken lightly.
zh-TW: 移除該等資料，不能掉以輕心去清除。

en: <primary><filename>config</filename>, <command>debconf</command> script</primary>
zh-TW: <primary><filename>config</filename>、<command>debconf</command> 腳本</primary>

en: The four scripts detailed above are complemented by a <filename>config</filename> script, provided by packages using <command>debconf</command> to acquire information from the user for configuration. During installation, this script defines in detail the questions asked by <command>debconf</command>. The responses are recorded in the <command>debconf</command> database for future reference. The script is generally executed by <command>apt</command> prior to installing packages one by one in order to group all the questions and ask them all to the user at the beginning of the process. The pre- and post-installation scripts can then use this information to operate according to the user's wishes.
zh-TW: <filename>config</filename> 腳本補充前述的 4 個腳本，套件以 <command>debconf</command> 取得組態用的資訊。安裝過程中，此腳本以 <command>debconf</command> 指令詢問使用者詳細的問題。把回應記錄在 <command>debconf</command> 資料庫供未來的參考。在安裝之前先由 <command>apt</command> 逐一執行該等腳本，歸納問題與回答。事前與事後安裝腳本可使用該等資訊回應使用者的期望。

en: <emphasis>TOOL</emphasis> <command>debconf</command>
zh-TW: <emphasis>工具</emphasis> <command>debconf</command>

en: <command>debconf</command> was created to resolve a recurring problem in Debian. All Debian packages unable to function without a minimum of configuration used to ask questions with calls to the <command>echo</command> and <command>read</command> commands in <filename>postinst</filename> shell scripts (and other similar scripts). But this also means that during a large installation or update the user must stay with their computer to respond to various questions that may arise at any time. These manual interactions have now been almost entirely dispensed with, thanks to the <command>debconf</command> tool.
zh-TW: <command>debconf</command> 係用於解決重複出現於 Debian 的問題。Debian 所有的套件都需要 <command>echo</command> 與 <command>read</command> 命令於 <filename>postinst</filename> 殼腳本 (及其他類似腳本) 的最低組態才能提出問題。也就是說在大型安裝或升級過程裡，使用者必須在電腦旁回應這些隨時出現的問題。感謝 <command>debconf</command> 工具的出現，這些人工互動幾乎全部免除了。

en: <command>debconf</command> has many interesting features: it requires the developer to specify user interaction; it allows localization of all the strings displayed to users (all translations are stored in the <filename>templates</filename> file describing the interactions); it has different frontends to display the questions to the user (text mode, graphical mode, non-interactive); and it allows creation of a central database of responses to share the same configuration with several computers... but the most important is that it is now possible to present all of the questions in a row to the user, prior to starting a long installation or update process. The user can go about their business while the system handles the installation on its own, without having to stay there staring at the screen waiting for questions.
zh-TW: <command>debconf</command> 包括很多有趣的功能：要求開發者指明使用者的互動；允許在地化顯示給使用者的字串 (描述互動的所有翻譯儲存在 <filename>templates</filename> 檔案)；顯示給使用者的前端問題 (文字模式、圖形模式、非互動式)；把回應集中在資料庫供其他電腦使用 ... 但最重要的已可把所有問題，在安裝或升級之前，以一列的模式顯示給使用者。使用者可以放任系統自行安裝，不必待在電腦旁，緊盯螢幕等待問題。

en: <primary>checksums</primary>
zh-TW: <primary>校驗</primary>

en: In effect, in this situation, <command>dpkg</command> behaves as intelligently as possible: if the standard configuration file has not changed between the two versions, it does nothing. If, however, the file has changed, it will try to update this file. Two cases are possible: either the administrator has not touched this configuration file, in which case <command>dpkg</command> automatically installs the new version; or the file has been modified, in which case <command>dpkg</command> asks the administrator which version they wish to use (the old one with modifications, or the new one provided with the package). To assist in making this decision, <command>dpkg</command> offers to display a “<command>diff</command>” that shows the difference between the two versions. If the user chooses to retain the old version, the new one will be stored in the same location in a file with the <filename>.dpkg-dist</filename> suffix. If the user chooses the new version, the old one is retained in a file with the <filename>.dpkg-old</filename> suffix. Another available action consists of momentarily interrupting <command>dpkg</command> to edit the file and attempt to re-instate the relevant modifications (previously identified with <command>diff</command>).
zh-TW: 實際上，在此情況下，<command>dpkg</command> 儘可能地機靈：若在兩個版本間的標準組態檔並未改變， dpkg 就什麼事也不做。但是，若檔案改變動，就會更新此檔案。有兩種可能：管理員碰觸此組態檔時，由  <command>dpkg</command> 自動安裝新版本；或者被管理員修改過，<command>dpkg</command> 將要求管理員指定安裝的版本 (修訂過的舊版本、或套件提供的新版本)。為了有助於決定，<command>dpkg</command> 提供 “<command>diff</command>” 指令顯示兩個版本的差異。若選擇保留舊版本，新版仍儲存在同個資料夾其後綴檔名為 <filename>.dpkg-dist</filename>。若選擇使用新版本，舊仍儲存在同個資料夾其後綴檔名為 <filename>.dpkg-old</filename>。另一個作為是暫時中斷 <command>dpkg</command> 以編輯檔案並試圖重新安裝相關的修訂 (之前被 <command>diff</command> 驗証的差異)。

en: <emphasis>GOING FURTHER</emphasis> Force dpkg to ask configuration file questions
zh-TW: <emphasis>進一步</emphasis> 強迫 dpkg 詢問組態檔的問題

en: <emphasis>GOING FURTHER</emphasis> Avoiding the configuration file questions
zh-TW: <emphasis>進一步</emphasis> 避免組態檔的問題

en: <command>dpkg</command> handles configuration file updates, but, while doing so, regularly interrupts its work to ask for input from the administrator. This makes it less than enjoyable for those who wish to run updates in a non-interactive manner. This is why this program offers options that allow the system to respond automatically according to the same logic: <command>--force-confold</command> retains the old version of the file; <command>--force-confnew</command> will use the new version of the file (these choices are respected, even if the file has not been changed by the administrator, which only rarely has the desired effect). Adding the <command>--force-confdef</command> option tells <command>dpkg</command> to decide by itself when possible (in other words, when the original configuration file has not been touched), and only uses <command>--force-confnew</command> or <command>--force-confold</command> for other cases.
zh-TW: <command>dpkg</command>  處理組態檔案升級，但經常中斷作業，要求管理者鍵入資料。如此一來，就不能以無中斷方式一氣呵成升級作業。此指令提供選項讓系統依同樣的邏輯自動回應：<command>--force-confold</command> 保留該檔案的舊版本；<command>--force-confnew</command> 使用該檔案的新版本 (即使該檔案未被管理者修改，仍使用指定的選擇，極少發生問題)。加入 <command>--force-confdef</command> 選項告訴 <command>dpkg</command> 在可能情況下自行決定 (換句話說，不改變原組態檔)，祗在其他的情況下，才使用 <command>--force-confnew</command> 或 <command>--force-confold</command>。

en: Including this option in the configuration file means that it will also be used in a graphical interface such as <command>aptitude</command>.
zh-TW: 把此選項納入組態檔的意思是，將使用 <command>aptitude</command> 之類的圖形介面。

en: Structure of a Source Package
zh-TW: 原始套件的結構

en: <primary>package</primary><secondary>source package</secondary>
zh-TW: <primary>套件</primary><secondary>原始套件</secondary>

en: Format
zh-TW: 格式

en: <primary>DSC file</primary>
zh-TW: <primary>DSC 檔案</primary>

en: The <filename>.dsc</filename> (Debian Source Control) file is a short text file containing an RFC 2822 header (just like the <filename>control</filename> file studied in <xref linkend="sect.control" />) which describes the source package and indicates which other files are part thereof. It is signed by its maintainer, which guarantees authenticity. See <xref linkend="sect.package-authentication" /> for further details on this subject.
zh-TW: <filename>.dsc</filename> (Debian Source Control) 檔案是包括 RFC 2822 標頭 (如同 <filename>control</filename> 檔案於 <xref linkend="sect.control" />) 的簡短文字檔，描述原始套件及包括的其他檔案。由維護者簽署，保證其真實性。詳情見 <xref linkend="sect.package-authentication" />。

en: A <filename>.dsc</filename> file
zh-TW: A <filename>.dsc</filename> 檔案

en: Note that the source package also has dependencies (<literal>Build-Depends</literal>) completely distinct from those of binary packages, since they indicate tools required to compile the software in question and construct its binary package.
zh-TW: 需注意原始套件和可執行套件一樣有相依性 (<literal>Build-Depends</literal>)，指出編譯有問題軟體與建構其可執行套件的工具。

en: <emphasis>CAUTION</emphasis> Distinct namespaces
zh-TW: <emphasis>注意</emphasis> 不同的命名空間

en: It is important to note here that there is no required correspondence between the name of the source package and that of the binary package(s) that it generates. It is easy enough to understand if you know that each source package may generate several binary packages. This is why the <filename>.dsc</filename> file has the <literal>Source</literal> and <literal>Binary</literal> fields to explicitly name the source package and store the list of binary packages that it generates.
zh-TW: 需注意，原始套件與其產生的可執行套件間，不需使用對應的名稱。每個原始套件可能產生多個可執行套件。所以 <filename>.dsc</filename> 檔案有 <literal>Source</literal> 與 <literal>Binary</literal> 欄位記錄原始套件的名稱與其產生的可執行套件清單。

en: <emphasis>CULTURE</emphasis> Why divide into several packages
zh-TW: <emphasis>文化</emphasis> 為什麼分為多個套件

en: Quite frequently, a source package (for a given software) can generate several binary packages. The split is justified by the possibility to use (parts of) the software in different contexts. Consider a shared library, it may be installed to make an application work (for example, <emphasis role="pkg">libc6</emphasis>), or it can be installed to develop a new program (<emphasis role="pkg">libc6-dev</emphasis> will then be the correct package). We find the same logic for client/server services where we want to install the server part on one machine and the client part on others (this is the case, for example, of <emphasis role="pkg">openssh-server</emphasis> and <emphasis role="pkg">openssh-client</emphasis>).
zh-TW: 通常，一個原始套件 (供指定軟體使用) 可產生多個可執行檔。因為可以在不同的環境使用 (部份) 軟體。在共享程式庫裡，可以安裝於構成應用作用 (如，<emphasis role="pkg">libc6</emphasis>)、或可以安裝以構成新的程式 (<emphasis role="pkg">libc6-dev</emphasis> 然後形成正確的套件)。在主從服務裡發現同樣的邏輯，在一部機器安裝伺服器的內容同時在另部機器安裝客戶端的內容 (在此情況下，是 <emphasis role="pkg">openssh-server</emphasis> 與 <emphasis role="pkg">openssh-client</emphasis>)。

en: <emphasis>PERSPECTIVE</emphasis> Different source package formats
zh-TW: <emphasis>透視</emphasis> 原始套件的不同格式

en: Originally there was only one source package format. This is the <literal>1.0</literal> format, which associates an <filename>.orig.tar.gz</filename> archive to a <filename>.diff.gz</filename> “debianization” patch (there is also a variant, consisting of a single <filename>.tar.gz</filename> archive, which is automatically used if no <filename>.orig.tar.gz</filename> is available).
zh-TW: 本來祗有一種原始套件的格式。就是 <literal>1.0</literal> 格式，與 <filename>.orig.tar.gz</filename> 和 <filename>.diff.gz</filename> “debian 化” 套件有關 (還有一個變種，由一個 <filename>.tar.gz</filename> 檔案構成，若無 <filename>.orig.tar.gz</filename> 可用時自動取用它)。

en: The <filename>.orig.tar.gz</filename> file is an archive containing the source code as provided by the original developer. Debian package maintainers are asked to not modify this archive in order to be able to easily check the origin and integrity of the file (by simple comparison with a checksum) and to respect the wishes of some authors.
zh-TW: <filename>.orig.tar.gz</filename> 檔案包括原發展者提供的原始碼。要求 Debian 的套件維護者不要修改它，以便檢查原來的檔案與整合後的檔案 (比較校驗碼就知道) 並且尊重其他著者的意願。

en: <emphasis>TOOL</emphasis> Decompressing a source package
zh-TW: <emphasis>工具</emphasis> 解壓縮原始套件

en: <primary>decompressing, source package</primary>
zh-TW: <primary>解壓縮，原始套件</primary>

en: <primary>uncompressing, source package</primary>
zh-TW: <primary>解壓縮，原始套件</primary>

en: <primary>unpacking</primary><secondary>source package</secondary>
zh-TW: <primary>拆包</primary><secondary>原始套件</secondary>

en: If you have a source package, you can use the <command>dpkg-source</command> command (from the <emphasis role="pkg">dpkg-dev</emphasis> package) to decompress it:
zh-TW: 使用原始套件時，您可使用 <command>dpkg-source</command> 指令 (從 <emphasis role="pkg">dpkg-dev</emphasis> 套件取得) 解壓縮它：

en: Usage within Debian
zh-TW: Debian 內的使用

en: Manipulating Packages with <command>dpkg</command>
zh-TW: 以 <command>dpkg</command> 管理套件

en: <emphasis>NOTE</emphasis> <command>dpkg</command> or <command>apt</command>?
zh-TW: <emphasis>說明</emphasis> <command>dpkg</command> 或 <command>apt</command>?

en: <command>dpkg</command> should be seen as a system tool (backend), and <command>apt</command> as a tool closer to the user, which overcomes the limitations of the former. These tools work together, each one with its particularities, suited to specific tasks.
zh-TW: <command>dpkg</command> 應視為系統工具 (背景) 之一，而 <command>apt</command> 則是較傾向使用者的工具，可克服前者的限制。這些工具各有其限制，共同解決特定的作業。

en: Installing Packages
zh-TW: 安裝套件

en: <primary>installation</primary><secondary>package installation</secondary>
zh-TW: <primary>安裝</primary><secondary>套件安裝</secondary>

en: <command>dpkg</command> is, above all, the tool for installing an already available Debian package (because it does not download anything). To do this, we use its <literal>-i</literal> or <literal>--install</literal> option.
zh-TW: 首先，<command>dpkg</command> 是安裝 Debian 已經可用套件的工具 (因為不需下載任何東西)。我們使用它的 <literal>-i</literal> 或 <literal>--install</literal> 選項。

en: Installation of a package with <command>dpkg</command>
zh-TW: 以 <command>dpkg</command> 安裝套件

en: Separate unpacking and configuration
zh-TW: 分開解壓與組態

en: <primary>package</primary><secondary>unpacking</secondary>
zh-TW: <primary>包裝</primary><secondary>解壓</secondary>

en: Sometimes <command>dpkg</command> will fail to install a package and return an error; if the user orders it to ignore this, it will only issue a warning; it is for this reason that we have the different <literal>--force-*</literal> options. The <command>dpkg --force-help</command> command, or documentation of this command, will give a complete list of these options. The most frequent error, which you are bound to encounter sooner or later, is a file collision. When a package contains a file that is already installed by another package, <command>dpkg</command> will refuse to install it. The following messages will then appear:
zh-TW: <command>dpkg</command> 安裝套件時偶而失敗並送回錯誤的訊息；若使用者要求忽略該等訊息，就能送出警示；這就是 <literal>--force-*</literal> 選項的用途。<command>dpkg --force-help</command> 命令，或此命令的文件，將提供完整的選項。最常發生的錯誤，遲早每個人都會碰到，就是檔案衝突。已被其他套件安裝使用的檔案，另個套件同時需要用到它時，<command>dpkg</command> 會於安裝時再次使手它。此時出現以下的訊息：

en: 
    <computeroutput>Unpacking libgdm (from .../libgdm_3.8.3-2_amd64.deb) ...
    dpkg: error processing /var/cache/apt/archives/libgdm_3.8.3-2_amd64.deb (--unpack):
     trying to overwrite '/usr/bin/gdmflexiserver', which is also in package gdm3 3.4.1-9</computeroutput>
zh-TW: 
    <computeroutput>Unpacking libgdm (from .../libgdm_3.8.3-2_amd64.deb) ...
    dpkg: 處理 /var/cache/apt/archives/libgdm_3.8.3-2_amd64.deb (--unpack) 時發生錯誤:
     試圖覆寫 '/usr/bin/gdmflexiserver'，也同時在套件 gdm3 3.4.1-9 內</computeroutput>

en: In this case, if you think that replacing this file is not a significant risk to the stability of your system (which is usually the case), you can use the option <literal>--force-overwrite</literal>, which tells <command>dpkg</command> to ignore this error and overwrite the file.
zh-TW: 碰到此情況，若您認為取代此檔案不會對系統的穩定產生重大的風險 (通常如此)，您可使用選項 <literal>--force-overwrite</literal>，告訴 <command>dpkg</command> 忽略此錯誤並覆寫該檔案。

en: <emphasis>CAUTION</emphasis> Effective use of <literal>--force-*</literal>
zh-TW: <emphasis>注意</emphasis> 有效使用 <literal>--force-*</literal>

en: <primary>broken dependency</primary>
zh-TW: <primary>破碎的相依性</primary>

en: If you are not careful, the use of an option <literal>--force-*</literal> can lead to a system where the APT family of commands will refuse to function. In effect, some of these options allow installation of a package when a dependency is not met, or when there is a conflict. The result is an inconsistent system from the point of view of dependencies, and the APT commands will refuse to execute any action except those that will bring the system back to a consistent state (this often consists of installing the missing dependency or removing a problematic package). This often results in a message like this one, obtained after installing a new version of <emphasis role="pkg">rdesktop</emphasis> while ignoring its dependency on a newer version of the <emphasis role="pkg">libc6</emphasis>:
zh-TW: 若不小心使用 <literal>--force-*</literal> 的選項，可能造成 APT 命令家族拒絕運作的困境。在相依性不足或衝突的情況下，使用部份選項後，仍可安裝該等套件。結果就是相依性不足的不一致系統，APT 命令將拒絕執行任何工作，直到系統恢復一致 (通常包括安裝遺失的相依套件或移除問題套件)。通常出現以下的訊息，安裝新版 <emphasis role="pkg">rdesktop</emphasis> 時忽略其對新版 <emphasis role="pkg">libc6</emphasis> 的相依性：

en: A courageous administrator who is certain of the correctness of their analysis may choose to ignore a dependency or conflict and use the corresponding <literal>--force-*</literal> option. In this case, if they want to be able to continue to use <command>apt</command> or <command>aptitude</command>, they must edit <filename>/var/lib/dpkg/status</filename> to delete/modify the dependency, or conflict, that they chose to override.
zh-TW: 確信其分析結果的勇敢管理者，可能選擇忽略使用 <literal>--force-*</literal> 選項時發生的相依性問題與衝突。結果是，想要繼續使用 <command>apt</command> 或 <command>aptitude</command> 的話，他們必須先編輯 <filename>/var/lib/dpkg/status</filename> 以刪除/修改相依性問題或衝突。

en: Removal and purge of the <emphasis role="pkg">debian-cd</emphasis> package
zh-TW: 移除與清除 <emphasis role="pkg">debian-cd</emphasis> 套件

en: Querying <command>dpkg</command>'s Database and Inspecting <filename>.deb</filename> Files
zh-TW: 查詢 <command>dpkg</command> 的資料庫與檢查 <filename>.deb</filename> 檔案

en: <primary>package</primary><secondary>status</secondary>
zh-TW: <primary>套件</primary><secondary>狀態</secondary>

en: <primary>package</primary><secondary>file list</secondary>
zh-TW: <primary>套件</primary><secondary>檔案清單</secondary>

en: <primary>package</primary><secondary>content inspection</secondary>
zh-TW: <primary>套件</primary><secondary>內容的檢視</secondary>

en: <emphasis>BACK TO BASICS</emphasis> Option syntax
zh-TW: <emphasis>回到</emphasis> 選項語法

en: Most options are available in a “long” version (one or more relevant words, preceded by a double dash) and a “short” version (a single letter, often the initial of one word from the long version, and preceded by a single dash). This convention is so common that it is a POSIX standard.
zh-TW: “長” 版 (一個或多個字，前置兩個連結號) 與 “短” 版 (一個字母，通常是長版字的第一個字母，前置一個連結號) 套件都有該等選項。這是 POSIX 標準常見的用法。

en: Various queries with <command>dpkg</command>
zh-TW: <command>dpkg</command> 的各種查詢

en: <emphasis>GOING FURTHER</emphasis> Comparison of versions
zh-TW: <emphasis>進一步</emphasis> 版本的比較

en: <primary>version, comparison</primary>
zh-TW: <primary>版本，比較</primary>

en: <primary>comparison of versions</primary>
zh-TW: <primary>比較版本</primary>

en: Since <command>dpkg</command> is the program for handling Debian packages, it also provides the reference implementation of the logic of comparing version numbers. This is why it has a <literal>--compare-versions</literal> option, usable by external programs (especially configuration scripts executed by <command>dpkg</command> itself). This option requires three parameters: a version number, a comparison operator, and a second version number. The different possible operators are <literal>lt</literal> (strictly less than), <literal>le</literal> (less than or equal to), <literal>eq</literal> (equal), <literal>ne</literal> (not equal), <literal>ge</literal> (greater than or equal to), and <literal>gt</literal> (strictly greater than). If the comparison is correct, <command>dpkg</command> returns 0 (success); if not, it gives a non-zero return value (indicating failure).
zh-TW: 因為 <command>dpkg</command> 是處理 Debian 套件的程式，它也能夠邏輯地比較版本編號。所以有 <literal>--compare-versions</literal> 選項，以外部程式使用它 (尤其是被 <command>dpkg</command> 本身執行的組態腳本)。這個選項需要三個參數：版本編號、比較運算元、以及第二個版本編號。可能的運算元為 <literal>lt</literal> (小於)、<literal>le</literal> (大於或等於)、<literal>eq</literal> (等於)、<literal>ne</literal> (不等於)、<literal>ge</literal> (大於或等於)、以及 <literal>gt</literal> (大於)。若比較結果正確，<command>dpkg</command> 送回 0 (成功)；若不正確，則送回 0 以外的數值 (表示失敗)。

en: Note the unexpected failure of the last comparison: for <command>dpkg</command>, <literal>pre</literal>, usually denoting a pre-release, has no particular meaning, and this program compares the alphabetic characters in the same way as the numbers (a &lt; b &lt; c ...), in alphabetical order. This is why it considers “<literal>0pre3</literal>” to be greater than “<literal>0</literal>”. When we want a package's version number to indicate that it is a pre-release, we use the tilde character, “<literal>~</literal>”:
zh-TW: 注意前例最後一個比較的失敗：<command>dpkg</command>、<literal>pre</literal>，表示為預釋出版，沒有特別的意義，此程式以比較數字版本 (a &lt; b &lt; c ...) 相同的方式比較字順版本。所以，“<literal>0pre3</literal>” 大於 “<literal>0</literal>”。我們以毛毛蟲 “<literal>~</literal>” 表示該套件的預釋出版：

en: <command>dpkg</command>'s Log File
zh-TW: <command>dpkg</command> 的日誌檔

en: <command>dpkg</command> keeps a log of all of its actions in <filename>/var/log/dpkg.log</filename>. This log is extremely verbose, since it details every one of the stages through which packages handled by <command>dpkg</command> go. In addition to offering a way to track dpkg's behavior, it helps, above all, to keep a history of the development of the system: one can find the exact moment when each package has been installed or updated, and this information can be extremely useful in understanding a recent change in behavior. Additionally, all versions being recorded, it is easy to cross-check the information with the <filename>changelog.Debian.gz</filename> for packages in question, or even with online bug reports.
zh-TW: <command>dpkg</command> 把所有的交易記錄存在名為 <filename>/var/log/dpkg.log</filename> 的日誌檔。這個日誌檔的內容頗為詳盡且囉唆，記錄套件被 <command>dpkg</command> 處理的每個程序。追蹤 dpkg 的每個作為之外，日誌檔還保留系統發展的記錄：可以覆查每個套件的安裝與移除步驟，對於瞭解最近的變動極有幫助。此外，還記錄所有的版本，可以交互檢查 <filename>changelog.Debian.gz</filename> 的內容，查看有問題的套件或線上的錯誤報告。

en: Multi-Arch Support
zh-TW: 多架構支援

en: <primary>Multi-Arch</primary>
zh-TW: <primary>多架構</primary>

en: <primary>architecture</primary><secondary>multi-arch support</secondary>
zh-TW: <primary>架構</primary><secondary>多架構支援</secondary>

en: All Debian packages have an <literal>Architecture</literal> field in their control information. This field can contain either “<literal>all</literal>” (for packages that are architecture independent) or the name of the architecture that it targets (like “amd64”, “armhf”, …). In the latter case, by default, <command>dpkg</command> will only accept to install the package if its architecture matches the host's architecture as returned by <command>dpkg --print-architecture</command>.
zh-TW: Debian 套件在其控制資訊內有個 <literal>Architecture</literal> 欄位。其內容為 “<literal>all</literal>” (表示該套件不受架構限制) 或指出其適用的架構 (如 “amd64”、“armhf”、…)。以後例而言，主機的架構符合後，<command>dpkg</command> 才開始安裝該套件，並送回 <command>dpkg --print-architecture</command>。

en: This restriction ensures that users do not end up with binaries compiled for an incorrect architecture. Everything would be perfect except that (some) computers can run binaries for multiple architectures, either natively (an “amd64“ system can run “i386” binaries) or through emulators.
zh-TW: 此限制確保使用者不會用到不合其架構的執行檔。除了可以執行多個架構的電腦之外，不論在地的 ( “amd64“ 系統可執行 “i386” 執行檔) 或虛擬的電腦都可找到適用的套件。

en: Enabling Multi-Arch
zh-TW: 啟用多架構

en: <command>dpkg</command>'s multi-arch support allows users to define “foreign architectures” that can be installed on the current system. This is simply done with <command>dpkg --add-architecture</command> like in the example below. There is a corresponding <command>dpkg --remove-architecture</command> to drop support of a foreign architecture, but it can only be used when no packages of this architecture remain.
zh-TW: <command>dpkg</command> 的多架構支授允許使用者限制 “怪異的架構” 安裝在現行的系統上。以下例的 <command>dpkg --add-architecture</command> 就能做到。有個對應的 <command>dpkg --remove-architecture</command> 指令可以除去怪異的架構，不過祗發生於無套件可用時。

en: <emphasis>NOTE</emphasis> APT's multi-arch support
zh-TW: <emphasis>說明</emphasis> APT 的多架構支援

en: Foreign packages can then be installed with <command>apt install <replaceable>package</replaceable>:<replaceable>architecture</replaceable></command>.
zh-TW: 可以使用 <command>apt install <replaceable>套件</replaceable>:<replaceable>架構</replaceable></command> 指令安裝怪異套件。

en: <emphasis>IN PRACTICE</emphasis> Using proprietary i386 binaries on amd64
zh-TW: <emphasis>實務</emphasis> 在 amd64 使用專屬的 i386 執行檔

en: Multi-Arch Related Changes
zh-TW: 多架構相關的改變

en: It is worth noting that <literal>Multi-Arch: same</literal> packages must have their names qualified with their architecture to be unambiguously identifiable. They also have the possibility to share files with other instances of the same package; <command>dpkg</command> ensures that all packages have bit-for-bit identical files when they are shared. Last but not least, all instances of a package must have the same version. They must thus be upgraded together.
zh-TW: <literal>Multi-Arch: same</literal> 套件的名稱必須符合其架構才能被明確的指認出來。也可能以相同的套件在其他情況下共享檔案；共享時，<command>dpkg</command> 確認所有套件的每個位元都相同。最後但不是最不重要，套件的所有實例必須使用相同的版本。也必須一起更新。

en: Multi-Arch support also brings some interesting challenges in the way dependencies are handled. Satisfying a dependency requires either a package marked “<literal>Multi-Arch: foreign</literal>” or a package whose architecture matches the one of the package declaring the dependency (in this dependency resolution process, architecture-independent packages are assumed to be of the same architecture than the host). A dependency can also be weakened to allow any architecture to fulfill it, with the <literal><replaceable>package</replaceable>:any</literal> syntax, but foreign packages can only satisfy such a dependency if they are marked “<literal>Multi-Arch: allowed</literal>”.
zh-TW: 多架構支援帶來處理相依性的有趣挑戰。滿足相依性的套件標示為 “<literal>Multi-Arch: foreign</literal>” 或宣告其匹配架構的相依性 (在這種相依性解決過程中，假設架構獨立的套件與主機不同)。相依性可能被弱化以允許納入其他架構，以 <literal><replaceable>套件</replaceable>:any</literal> 語法，但怪異套件祗需滿足一個相依性，如果標示為 “<literal>Multi-Arch: allowed</literal>”。

en: Coexistence with Other Packaging Systems
zh-TW: 與其他打包系統共存

en: <primary><command>alien</command></primary>
zh-TW: <primary><command>外來</command></primary>

en: Debian packages are not the only software packages used in the free software world. The main competitor is the RPM format of the Red Hat Linux distribution and its many derivatives. Red Hat is a very popular, commercial distribution. It is thus common for software provided by third parties to be offered as RPM packages rather than Debian.
zh-TW: Debian 套件不是自由軟體世界唯一的軟體套件。主要的競爭者是紅帽發行版的 RPM 格式及其衍生者。紅帽是極為風行、商業化的發行版。第三方軟體極喜歡使用 RPM 套件而不是 Debian。

en: In this case, you should know that the program <command>rpm</command>, which handles RPM packages, is available as a Debian package, so it is possible to use this package format on Debian. Care should be taken, however, to limit these manipulations to extract the information from a package or to verify its integrity. It is, in truth, unreasonable to use <command>rpm</command> to install an RPM on a Debian system; RPM uses its own database, separate from those of native software (such as <command>dpkg</command>). This is why it is not possible to ensure a stable coexistence of two packaging systems.
zh-TW: 在此情況下，Debian 套件也有能夠處理 RPM 套件的 <command>rpm</command> 程式，因此，Debian 也能使用此等格式套件。不過，要小心提取該等套件的資訊或確認其正當性。因此，在 Debian 系統過度使用 <command>rpm</command> 安裝 RPM 套件，有點麻煩；RPM 使用自己的資料庫，不理會原生軟體 (諸如 <command>dpkg</command>) 的資料庫。無法保證這兩種套件系統並存的穩定性。

en: On the other hand, the <emphasis role="pkg">alien</emphasis> utility can convert RPM packages into Debian packages, and vice versa.
zh-TW: 換句話說，<emphasis role="pkg">alien</emphasis> 工具可以把 RPM 套件與 Debian 套件互相轉換。

en: <emphasis>COMMUNITY</emphasis> Encouraging the adoption of <filename>.deb</filename>
zh-TW: <emphasis>社群</emphasis> 鼓勵採用 <filename>.deb</filename>

en: You will find that this process is extremely simple. You must know, however, that the package generated does not have any dependency information, since the dependencies in the two packaging formats don't have systematic correspondence. The administrator must thus manually ensure that the converted package will function correctly, and this is why Debian packages thus generated should be avoided as much as possible. Fortunately, Debian has the largest collection of software packages of all distributions, and it is likely that whatever you seek is already in there.
zh-TW: 此例極為簡單。然而，您必須知道不需任何相依性資訊就能產生套件，兩種套件格式並不必然有系統性的關係。管理者必須以手動方式確保轉換過的套件能夠正確運作，這就是 Debian 產生的套件能夠避免此種可能。幸運的是，Debian 擁有軟體套件各種版本的資料庫，想要的都能找到。

en: Looking at the man page for the <command>alien</command> command, you will also note that this program handles other packaging formats, especially the one used by the Slackware distribution (it is made of a simple <filename>tar.gz</filename> archive).
zh-TW: 查看 <command>alien</command> 指令的 man 頁面，您將注意到此程式也處理其他套件格式，尤其是 Slackware 發行版 (即簡單的 <filename>tar.gz</filename> 壓縮檔) 使用的套件格式。

en: The stability of the software deployed using the <command>dpkg</command> tool contributes to Debian's fame. The APT suite of tools, described in the following chapter, preserves this advantage, while relieving the administrator from managing the status of packages, a necessary but difficult task.
zh-TW: 使用 <command>dpkg</command> 工具可穩定地部署軟體維護 Debian 的名聲。接著討論的 APT 工具組，保留這些優點，而且讓管理者從必要且複雜的套件管理工作中解放出來。
