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

Translation

(itstool) path: sect2/screen
English
<prompt>#</prompt> <userinput>/usr/sbin/pkg</userinput>
Context English Chinese (Simplified) (zh_CN) State
To receive less information, use the <command>quicksearch</command> feature: 若不要接受这么多信息,可使用<command>quicksearch</command>功能:
<prompt>#</prompt> <userinput>cd /usr/ports</userinput>
<prompt>#</prompt> <userinput>make quicksearch name=lsof</userinput>
Port: lsof-4.88.d,8
Path: /usr/ports/sysutils/lsof
Info: Lists information about open files (similar to fstat(1))
<prompt>#</prompt> <userinput>cd /usr/ports</userinput>
<prompt>#</prompt> <userinput>make quicksearch name=lsof</userinput>
Port: lsof-4.88.d,8
Path: /usr/ports/sysutils/lsof
Info: Lists information about open files (similar to fstat(1))
For more in-depth searching, use <command>make search key=<replaceable>string</replaceable></command> or <command>make quicksearch key=<replaceable>string</replaceable></command>, where <replaceable>string</replaceable> is some text to search for. The text can be in comments, descriptions, or dependencies in order to find ports which relate to a particular subject when the name of the program is unknown. 若要进行更有深度的搜索,使用<command>make search key=<replaceable>string</replaceable></command>或<command>make quicksearch key=<replaceable>string</replaceable></command>其中<replaceable>string</replaceable>是要搜索的文字。该文字可以是一部份的注释、描述或相依套件,当不清楚程序的名称时可以找到与特定主题相关的Port。
search search
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>

Loading…

<prompt>#</prompt> <userinput>/usr/sbin/pkg</userinput>
<prompt>#</prompt> <userinput>/usr/sbin/pkg</userinput>
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/screen
Flags
no-wrap
Source string location
book.translate.xml:9571
String age
a year ago
Source string age
a year ago
Translation file
books/zh_CN/handbook.po, string 1585