The translation is temporarily closed for contributions due to maintenance, please come back later.

Translation

(itstool) path: sect2/para
English
When upgrading an existing system that originally used the older pkg_* tools, the database must be converted to the new format, so that the new tools are aware of the already installed packages. Once <application>pkg</application> has been installed, the package database must be converted from the traditional format to the new format by running this command:
Context English Chinese (Simplified) (zh_CN) State
quicksearch quicksearch
When using <_:buildtarget-1/> or <_:buildtarget-2/>, the search string is case-insensitive. Searching for <quote>LSOF</quote> will yield the same results as searching for <quote>lsof</quote>. 当使用<_:buildtarget-1/>或 <_:buildtarget-2/>时,搜索的字串不分大小写。搜索<quote>LSOF</quote>会与搜索<quote>lsof</quote>产生相同的结果。
Using <application>pkg</application> for Binary Package Management 使用<application>pkg</application>管理二进制套件
<application>pkg</application> is the next generation replacement for the traditional FreeBSD package management tools, offering many features that make dealing with binary packages faster and easier. <application>pkg</application>是新一代套件管理工具用来取代旧版工具,提供许多功能让处理二进制套件更快更简单。
For sites wishing to only use prebuilt binary packages from the FreeBSD mirrors, managing packages with <application>pkg</application> can be sufficient. 对于只想要使用在FreeBSD镜像站上预先编译Binary套件的站台,使用<application>pkg</application>管理套件便已足够。
However, for those sites building from source or using their own repositories, a separate <link linkend="ports-upgrading-tools">port management tool</link> will be needed. 但是,对于那些想要从源码或使用自己的文件库编译的站台,则会需要<link linkend="ports-upgrading-tools">Port管理工具</link>。
Since <application>pkg</application> only works with binary packages, it is not a replacement for such tools. Those tools can be used to install software from both binary packages and the Ports Collection, while <application>pkg</application> installs only binary packages. 因为<application>pkg</application>仅能管理Binary套件,所以不能当做为替代Port管理工具,这些工具可用来安装来自Binary与Port套件集的软件,而<application>pkg</application>仅能安装Binary套件。
Getting Started with <application>pkg</application> 开始使用<application>pkg</application>
FreeBSD includes a bootstrap utility which can be used to download and install <application>pkg</application> and its manual pages. This utility is designed to work with versions of FreeBSD starting with 10.<replaceable>X</replaceable>. FreeBSD内置启动(Bootstrap)工具可用来下载并安装<application>pkg</application>及其操作手册。这个工具是设计在FreeBSD版本10.<replaceable>X</replaceable>之后使用。
Not all FreeBSD versions and architectures support this bootstrap process. The current list is at <link xlink:href="https://pkg.freebsd.org/"/>. For other cases, <application>pkg</application> must instead be installed from the Ports Collection or as a binary package. 不是所有 FreeBSD 版本及构架支持此启动程序,目前支持的清单列于<link xlink:href="http://pkg.freebsd.org/"/>,对不支持的版本,必须改透过Port套件集或者Binary套件来安装<application>pkg</application>。
To bootstrap the system, run: 要初始化(Bootstrap)系统请执行:
<prompt>#</prompt> <userinput>/usr/sbin/pkg</userinput> <prompt>#</prompt> <userinput>/usr/sbin/pkg</userinput>
You must have a working Internet connection for the bootstrap process to succeed. 您必须有可用的网络连接(注:正常访问 pkg.freebsd.org)供启动程序使用方可成功。
Otherwise, to install the port, run: 否则,要安装Port套件,则须执行:
<prompt>#</prompt> <userinput>cd /usr/ports/ports-mgmt/pkg</userinput>
<prompt>#</prompt> <userinput>make</userinput>
<prompt>#</prompt> <userinput>make install clean</userinput>
<prompt>#</prompt> <userinput>cd /usr/ports/ports-mgmt/pkg</userinput>
<prompt>#</prompt> <userinput>make</userinput>
<prompt>#</prompt> <userinput>make install clean</userinput>
When upgrading an existing system that originally used the older pkg_* tools, the database must be converted to the new format, so that the new tools are aware of the already installed packages. Once <application>pkg</application> has been installed, the package database must be converted from the traditional format to the new format by running this command: 当升级原使用旧版pkg_*工具的既有系统时,必须将数据库转换成新的格式,如此新的工具才会知道有那些已安装过的套件。<application>pkg</application>安装完后,必须执行以下指令将套件数据库从旧版格式转换到新版格式:
<prompt>#</prompt> <userinput>pkg2ng</userinput> <prompt>#</prompt> <userinput>pkg2ng</userinput>
This step is not required for new installations that do not yet have any third-party software installed. 新安装的版本因尚未安装任何第三方软件因此不须做这个步骤。
This step is not reversible. Once the package database has been converted to the <application>pkg</application> format, the traditional <literal>pkg_*</literal> tools should no longer be used. 这个步骤无法还原。一旦套件数据库转为成<application>pkg</application>的格式,旧版<literal>pkg_*</literal>工具就不该再继续使用。
The package database conversion may emit errors as the contents are converted to the new version. Generally, these errors can be safely ignored. However, a list of software that was not successfully converted is shown after <command>pkg2ng</command> finishes. These applications must be manually reinstalled. 套件数据库转换的过程可能会因内容转换为新版本产生错误。通常,这些错误皆可安全忽略,即使如此,仍然有在执行<command>pkg2ng</command>后无法成功转换的软件清单,这些应用程序则必须手动重新安装。
To ensure that the Ports Collection registers new software with <application>pkg</application> instead of the traditional packages database, FreeBSD versions earlier than 10.<replaceable>X</replaceable> require this line in <filename>/etc/make.conf</filename>: 为了确保FreeBSD Port套件集会将新软件的信息注册到<application>pkg</application>而非旧版套件数据库,FreeBSD版本10.<replaceable>X</replaceable>之前需要在<filename>/etc/make.conf</filename>加入此行:
WITH_PKGNG= yes WITH_PKGNG= yes
By default, <application>pkg</application> uses the binary packages from the FreeBSD package mirrors (the <emphasis>repository</emphasis>). For information about building a custom package repository, see <xref linkend="ports-poudriere"/>. 预设<application>pkg</application>会使用FreeBSD套件镜像站(<emphasis>Repository</emphasis>)的Binary套件。若要取得有关编译自定义套件文件库的信息,请参考<xref linkend="ports-poudriere"/>。
Additional <application>pkg</application> configuration options are described in <citerefentry><refentrytitle>pkg.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. 其他<application>pkg</application>设定选项说明请参考<citerefentry><refentrytitle>pkg.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>。
Usage information for <application>pkg</application> is available in the <citerefentry><refentrytitle>pkg</refentrytitle><manvolnum>8</manvolnum></citerefentry> manual page or by running <command>pkg</command> without additional arguments. <application>pkg</application>的用法信息可在<citerefentry><refentrytitle>pkg</refentrytitle><manvolnum>8</manvolnum></citerefentry>操作手册或不加任何参数执行<command>pkg</command>来取得。
Each <application>pkg</application> command argument is documented in a command-specific manual page. To read the manual page for <command>pkg install</command>, for example, run either of these commands: 每个<application>pkg</application>指令参数皆记库在指令操件手册。要阅读<command>pkg install</command>的操作手册,可执行以下指令:
<prompt>#</prompt> <userinput>pkg help install</userinput> <prompt>#</prompt> <userinput>pkg help install</userinput>
<prompt>#</prompt> <userinput>man pkg-install</userinput> <prompt>#</prompt> <userinput>man pkg-install</userinput>
The rest of this section demonstrates common binary package management tasks which can be performed using <application>pkg</application>. Each demonstrated command provides many switches to customize its use. Refer to a command's help or man page for details and more examples. 本章节剩余部份将介绍如何使用<application>pkg</application>执行常用的Binary套件管理工作。每个示范的指令皆会提供多个参数可使用,请参考指令的说明或操作手册以取得详细信息或更多示例。
Quarterly and Latest Ports Branches Ports 分支:Quarterly 和 Latest
The <literal>Quarterly</literal> branch provides users with a more predictable and stable experience for port and package installation and upgrades. This is done essentially by only allowing non-feature updates. Quarterly branches aim to receive security fixes (that may be version updates, or backports of commits), bug fixes and ports compliance or framework changes. The Quarterly branch is cut from HEAD at the beginning of every (yearly) quarter in January, April, July, and October. Branches are named according to the year (YYYY) and quarter (Q1-4) they are created in. For example, the quarterly branch created in January 2016, is named 2016Q1. And the <literal>Latest</literal> branch provides the latest versions of the packages to the users. <literal>Quarterly</literal> 分支为用户提供了更可预测和更稳定的 port 和软件包安装和升级体验。这主要是通过只允许非功能更新来实现的。季度(Quarterly)分支的目标是接收安全修复 (可能是版本更新, 或提交的回溯)、 错误修复和 port 合规性或框架变化。季度分支在每个(年)季度的1月、4月、7月和10月开始时从HEAD中切出。分支是根据它们创建的年份 (YYYY) 和季度 (Q1-4) 来命名的。例如,在2016年1月创建的季度分支,被命名为2016Q1。而<literal>Latest</literal>分支则为用户提供最新版本的软件包。

Loading…

When upgrading an existing system that originally used the older pkg_* tools, the database must be converted to the new format, so that the new tools are aware of the already installed packages. Once <application>pkg</application> has been installed, the package database must be converted from the traditional format to the new format by running this command:
当升级原使用旧版pkg_*工具的既有系统时,必须将数据库转换成新的格式,如此新的工具才会知道有那些已安装过的套件。<application>pkg</application>安装完后,必须执行以下指令将套件数据库从旧版格式转换到新版格式:
a year ago
Browse all component changes

Glossary

English Chinese (Simplified) (zh_CN)
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect2/para
Source string location
book.translate.xml:9582
String age
a year ago
Source string age
a year ago
Translation file
books/zh_CN/handbook.po, string 1589