- MFen: 1.268 -> 1.271
Submitted by: whsyu Obtained from: The FreeBSD Traditional Chinese Project https://opensvn.csie.org/traccgi/freebsddoc/wiki
This commit is contained in:
parent
e9c1b4ce3a
commit
88eb7ce95f
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=31372
1 changed files with 33 additions and 12 deletions
|
@ -2,7 +2,7 @@
|
|||
The FreeBSD Documentation Project
|
||||
|
||||
$FreeBSD$
|
||||
Original revision: 1.268
|
||||
Original revision: 1.271
|
||||
-->
|
||||
|
||||
<chapter id="ports">
|
||||
|
@ -247,12 +247,11 @@
|
|||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>若知道該 port 的正確名稱,但不知道放在哪個分類目錄,
|
||||
可以用 &man.whereis.1; 指令來找出來。
|
||||
只要打 <command>whereis
|
||||
<replaceable>file</replaceable></command> 即可,而
|
||||
<replaceable>file</replaceable> 的地方請改為想裝的軟體名稱。
|
||||
若找到該軟體,就會告訴你,就像下面這樣:</para>
|
||||
<para>若知道該 port 的正確名稱,但不知道放在哪個分類目錄,可以用
|
||||
&man.whereis.1; 指令來找出來。 只要打 <command>whereis
|
||||
<replaceable>file</replaceable></command> 即可,而
|
||||
<replaceable>file</replaceable> 的地方請改為想裝的軟體名稱。
|
||||
若找到該軟體,就會告訴你,就像下面這樣:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>whereis lsof</userinput>
|
||||
lsof: /usr/ports/sysutils/lsof</screen>
|
||||
|
@ -260,13 +259,20 @@ lsof: /usr/ports/sysutils/lsof</screen>
|
|||
<para>如此一來,就會知道 <command>lsof</command> (系統工具程式) 是放在
|
||||
<filename>/usr/ports/sysutils/lsof</filename> 目錄。</para></listitem>
|
||||
|
||||
<listitem>
|
||||
<para>此外,也可以用 &man.echo.1; 輕鬆找出該 port 是位於 porte tree
|
||||
的何處。 舉例來說:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>echo /usr/ports/*/*lsof*</userinput>
|
||||
/usr/ports/sysutils/lsof</screen>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>還有另一招,就是用 Ports Collection 本身內建的搜尋機制。
|
||||
要用的時候,請先切換到 <filename>/usr/ports</filename> 目錄。
|
||||
然後,打 <command>make search
|
||||
name=<replaceable>program-name</replaceable></command>,其中
|
||||
<replaceable>program-name</replaceable> 請改為想找的軟體名稱。
|
||||
舉例來說,若要找的是 <command>lsof</command> 的話,那麼就是:</para>
|
||||
要用的時候,請先切換到 <filename>/usr/ports</filename> 目錄。
|
||||
然後,打 <command>make search name=<replaceable>程式名稱</replaceable></command>
|
||||
,其中 <replaceable>程式名稱</replaceable> 請改為想找的軟體名稱。
|
||||
舉例來說,若要找的是 <command>lsof</command> 的話,那麼就是:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports</userinput>
|
||||
&prompt.root; <userinput>make search name=lsof</userinput>
|
||||
|
@ -999,6 +1005,21 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch</userinput></screen>
|
|||
<makevar>PREFIX</makevar> 是相當困難,甚至是不可能的事。</para>
|
||||
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>重新設定 Ports 選項</title>
|
||||
|
||||
<para>在編譯某些 port 時會出現選單畫面(ncurses-based),
|
||||
可以用來選擇安裝選項。 通常裝好該 port 之後,便不太會需要重加、
|
||||
移除、更改一些當初安裝的選項。 但日後若有需要的話,
|
||||
也有許多方式可以調整這些選項。 其中一種方式便是切到該 port 目錄,
|
||||
並打 <command>make</command> <maketarget>config</maketarget>
|
||||
即可再次回到選項畫面去作調整。 另外還可用 <command>make</command>
|
||||
<maketarget>showconfig</maketarget> 以顯示該 port 安裝時所用的選項。
|
||||
也可以用 <command>make</command> <maketarget>rmconfig</maketarget>
|
||||
來把所有選項回到初始設定。 這些選項跟其他動作都可參閱 &man.ports.7;
|
||||
內的詳細說明。</para>
|
||||
</sect3>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="ports-removing">
|
||||
|
|
Loading…
Reference in a new issue