Re: _關¤_配置MYSQL和PHP的問題!
On Mon, Jun 04, 2001 at 09:56:20PM +0800, wqinian rao wrote:
> 你好:
> 我一直不明白怎麼才能知道一個程序需要哪些LIB等的,怎麼看一個程序
> 要依靠其它的東西呢。
這個嘛,其實我也不是常常一看就知道。 ^_^ 通常有幾個方法:
1. 閱讀說明文檔。 README 和 INSTALL 等文件常常會說明你需要安裝什麼
程序庫和其他應用軟件,才能正確編譯。
2. 嘗試用 ./configure; make 編譯,並留意注意任何信息。尤其是
configure 會告訴你,它找到了什麼,找不到什麼等等。
make 時,如果欠了那個程序庫或應用程序,當然就會出錯了。
那時就看看是什麼地方出錯了,欠了那些文件,等等。
3. 在 Debian 上有兩種很方便的方法:
一、如果 Debian 已經有你想編譯的軟件,那麼你直接把 Debian 的
源代碼包下載回來:
apt-get source mysql php4
再看看 debian/control 文件的 Build-Depends 和 Build-Depends-Indep
欄就可以了。無他的,Debian 的開發人員打包時已經檢查清楚
所需的其他軟件和程序庫了。你照 Build-Depends 所列安裝,
不就可以了嗎? :-)
二、想知道某個文件,例如 /usr/include/guile-readline/readline.h,
在哪個軟件包裡嗎?不用愁,訪問 http://packages.debian.org/ ,
即 http://www.debian.org/distrib/packages ,在該網頁底
有一個 "Search the Contents of the Latest Release" 功能,
就可以很輕易地發現,原來這個文件在 libguile6-dev 包裡。
(Debian stable)
4. 也不妨看看源代碼文件,如 *.h,*.c 等,看它們 #include 了什麼。 :-)
還有其他小技巧,例如可以借用 dpkg -L, dpkg -S, apt-cache search,
apt-cache showpkg 等工具,幫助你解迷。
就是這樣了! :-) 久而久之,你對各個常用的程序庫的較熟悉時,
就越來越容易能夠「直覺」地知道需要安裝其他什麼包了。 :-)
東東
--
Anthony Fok Tung-Ling Civil and Environmental Engineering
foka@ualberta.ca, foka@debian.org University of Alberta, Canada
Debian GNU/Linux Chinese Project -- http://www.debian.org/intl/zh/
Come visit Our Lady of Victory Camp -- http://www.olvc.ab.ca/
--
| This message was re-posted from debian-chinese-gb@lists.debian.org
| and converted from gb2312 to big5 by an automatic gateway.
Reply to: