今天在安裝gftp2.0.19的時候./configure后,缺少相應的包,以至于不能make。也就是找不到makefile文件了,明明文件在那呢,為什么找不到呢?因為缺少了編譯的環境,下文就我在安裝gftp里出現的問題,查找了網絡上的方法,下面的過程幾乎跟我遇到的問題很像,不過我到安裝libgtk2.0-dev之后就可以通過了。這個依賴于個人的系統內已經安裝了的包相關。
#如果是需要編譯的環境,推薦安裝"build essential"包[1]
#sudo apt-get install "build-essential"
在用./configure ,make , makeinstall ,方法安裝軟件是,經常會發生發生各種錯誤,
而導致無法聲稱 makefile
現在我把我安裝過程中遇到的問題以及解決辦法寫下來,希望對大家有點幫助
以我安裝 pidgin-2.0.0為例
./configure 出現錯誤 :
configure: error: C compiler cannot create executables
按照錯誤提示安裝缺少的包
sudo apt-get install libc6-dev
再次
./configure
出現錯誤
checking for GLIB... no
no
configure: error:
You must have the GLib 2.0 development headers installed to build.
根據錯誤提示 用新得立 搜索 GLib 2.0 或者 用命令 apt-cache search GLib 2.0
有個包 libglib2.0-dev - Development files for the GLib library
安裝
sudo apt-get install libglib2.0-dev #這里原文為libglib2.0-0-dev,似乎有誤--azalea注
./configure
又出現錯誤
checking for X... no
checking for GTK... no
no
configure: error:
You must have the GTK+ 2.0 development headers installed to compile Pidgin.
If you only want to build Finch then specify --disable-gtkui when running configure.
用如上同樣的方法查找到缺少的包 并安裝
sudo apt-get install libgtkmm2.0-dev
./configure 出現錯誤
checking for LIBXML... no
no
configure: error:
You must have libxml2 >= 2.6.0 development headers installed to build.
于是安裝
sudo apt-get install libxml2-dev
經過上面包的安裝,在次./configure 沒有在出現錯誤,這次成功的聲稱了makefile
然后在
make
make install
成功安裝軟件。
如果在./configure中還出現問題,那么要找到問題所在,安裝缺失的包 即可
在配置過程中,config.log文件是很有幫助的。 我們可以在這里面找出錯誤的根源,從而尋找應對措施。
[1]http://tech.ccidnet.com/art/2583/20070828/1193135_1.html