- MFen: 1.263 -> 1.268

Obtained from:	The FreeBSD Traditional Chinese Project
This commit is contained in:
Chin-San Huang 2007-09-16 14:18:29 +00:00
parent 401b135aac
commit 92a659fdb4
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=30789

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
$FreeBSD$
Original revision: 1.263
Original revision: 1.268
-->
<chapter id="ports">
@ -146,7 +146,7 @@
<listitem>
<para>為了讓 package 能在大多數系統上順利執行,
通常在編譯時會使用比較保守的選項。 然而,
透過 port 安裝的話,則可針對特定環境(比如: Pentium IV 或 Athlon CPU)
透過 port 安裝的話,則可針對特定環境(比如: Pentium 4 或 Athlon CPU)
來調整選項,以符合需求。</para>
</listitem>
@ -204,7 +204,7 @@
</warning>
<para>本章接下來將介紹如何在 FreeBSD 使用 package 及 port 來安裝、管理
third party 軟體。</para>
third-party 軟體。</para>
</sect1>
<sect1 id="ports-finding-applications">
@ -490,6 +490,17 @@ docbook =
</para>
<screen>&prompt.root; <userinput>pkg_delete <replaceable>xchat-1.7.1</replaceable></userinput></screen>
<para>請注意 &man.pkg.delete.1; 須要放上完整的軟體名稱以及版本,
若只輸入 <replaceable>xchat</replaceable> 就不行,必須換成
<replaceable>xchat-1.7.1</replaceable> 才可。 然而,我們可以用
&man.pkg.version.1; 輕鬆找出已裝的所有軟體版本,或者以 wildcard
(萬用字元) 的方式:</para>
<screen>&prompt.root; <userinput>pkg_delete <replaceable>xchat\*</replaceable></userinput></screen>
<para>以上面例子而言,將會移除所有以 <literal>xchat</literal>
開頭的軟體。</para>
</sect2>
<sect2>
@ -540,7 +551,7 @@ docbook =
<para>第一次跑 <application>CVSup</application> 之前,請先確認
<filename role="directory">/usr/ports</filename>
的! 若你已經裝了 Ports Collection ,但又自行加上其他 patch
乾淨的! 若你已經裝了 Ports Collection ,但又自行加上其他 patch
檔,那麼 <application>CVSup</application>
並不會刪除你自行加上的 patch 檔,這樣可能會導致要安裝某些軟體時,
發生 patch 失敗或編譯失敗。</para>
@ -731,8 +742,9 @@ docbook =
<listitem>
<para><filename>distinfo</filename> 檔。
編譯該軟體所需下載的檔案、checksum(檢驗檔案用)都會記錄在這檔,
並會用 &man.md5.1; 相關工具來確保所下載的檔案是正確無誤的。</para>
編譯該軟體所需下載的檔案、checksum(使用 &man.md5.1; 及
&man.sha256.1; 來檢驗檔案)都會記錄在這檔,
以確保所下載的檔案是正確無誤的。</para>
</listitem>
<listitem>
@ -881,7 +893,7 @@ docbook =
詳情請參閱你所使用的 shell 相關文件。</para>
</note>
<para>有些由所謂 third party 所發行的 DVD-ROM 產品,像是
<para>有些由所謂 third-party 所發行的 DVD-ROM 產品,像是
<ulink url="http://www.freebsdmall.com/">FreeBSD
Mall</ulink> 所發行的 FreeBSD Toolkit 會包括 distfiles 檔案,
這些檔案可用來搭配 Ports Collection。
@ -955,7 +967,7 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch</userinput></screen>
<screen>&prompt.root; <userinput>make PORTSDIR=/usr/home/example/ports install</userinput></screen>
<para>以上會在will compile the port in
<para>以上會在
<filename>/usr/home/example/ports</filename> 內進行編譯,
並把所有檔案安裝到 <filename>/usr/local</filename> 內。</para>
@ -1079,7 +1091,7 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch</userinput></screen>
若不想如此又變成使用 port 方式安裝,則用 <option>-PP</option>
即可強制避免使用 port 方式安裝。</para>
<screen>&prompt.root; <userinput>portupgrade -PR gnome2</userinput></screen>
<screen>&prompt.root; <userinput>portupgrade -PP gnome2</userinput></screen>
<para>若只想下載 distfiles(或者若指定 <option>-P</option> 的話,則是
package)而不想編譯或安裝檔案,可以使用 <option>-F</option>。
@ -1093,8 +1105,9 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch</userinput></screen>
<primary>portmanager</primary>
</indexterm>
<para><application>Portmanager</application> 也可以用來輕鬆升級已裝的軟體。
該工具可從 <filename role="package">ports-mgmt/portmanager</filename> port 安裝:</para>
<para><application>Portmanager</application>
也可以用來輕鬆升級已裝的軟體。 該工具可從 <filename
role="package">ports-mgmt/portmanager</filename> port 安裝:</para>
<screen>&prompt.root; <userinput>cd <filename role="directory">/usr/ports/ports-mgmt/portmanager</filename></userinput>
&prompt.root; <userinput>make install clean</userinput></screen>
@ -1103,22 +1116,24 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch</userinput></screen>
<screen>&prompt.root; <userinput>portmanager -u</userinput></screen>
<para>此外,使用參數可以改為 <option>-ui</option>,如此一來 <application>Portmanager</application>
在升級一些有特殊選項的軟體時,就會詢問該如何升級。
<application>Portmanager</application> 也可以用來裝新 port。與以往常用的
<command>make install clean</command> 指令不同之處在於:它會先升級你要裝的 port 所相依的所有 ports
然後才開始編譯、安裝要裝的 port。</para>
<para>此外,使用參數可以改為 <option>-ui</option>,如此一來
<application>Portmanager</application> 在升級一些有特殊選項的軟體時
,就會詢問該如何升級。 <application>Portmanager</application>
也可以用來裝新 port。與以往常用的
<command>make install clean</command> 指令不同之處在於:
它會先升級你要裝的 port 所相依的所有 ports然後才開始編譯、
安裝要裝的 port。</para>
<screen>&prompt.root; <userinput>portmanager <replaceable>x11/gnome2</replaceable></userinput></screen>
<para>若要裝的 port 之軟體相依關係有問題時,也可以用 <application>Portmanager</application>
使它們重歸正軌。而 <application>Portmanager</application> 解決相依問題完畢之後,該 port
<para>若要裝的 port 之軟體相依關係有問題時,也可以用
<application>Portmanager</application> 使它們重歸正軌。 而
<application>Portmanager</application> 解決相依問題完畢之後,該 port
也會重新編譯,以因應正確的相依關係。</para>
<screen>&prompt.root; <userinput>portmanager <replaceable>graphics/gimp</replaceable> -f</userinput></screen>
<para>其他運用方式,請參閱
<application>Portmanager</application> 的線上手冊。</para>
<para>其餘運用法門,請參閱 &man.portmanager.1; 說明。</para>
</sect3>
</sect2>