環境:centos 5.10 安裝系統時,沒有選擇軟件依賴包,很多軟件都沒有安裝。
現在需要安裝軟件,安裝軟件時報錯:
make: *** 沒有指明目標並且找不到 makefile。 停止。
原因是因爲沒有執行./configure
接下來執行 ./configure 報錯:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking for C++ compiler default output file name... configure: error: C++ compiler cannot create executables
See `config.log' for more details.
原因是缺少c++編譯器,也可以查看日誌得到一些信息,
安裝c++編譯器,
yum install gcc-c++ 注意(有些是yum install g++ 但是5.10 的系統版本一定要用gcc-c++)
這裏要注意,安裝過程中有一個Is this ok [y/N]: 這裏一定要輸入一個y 否則會出錯:
Is this ok [y/N]: Exiting on user Command
Complete! 雖然完成了,但是還沒有安裝成功,再執行 ./configure 還是報錯。
安裝完後,就可以了。
參考鏈接
:http://blog.163.com/haizhifeng6@126/blog/static/45615427201182712221960/
http://blog.csdn.net/coofucoo/article/details/4813339
http://hi.baidu.com/cwbdde/item/ec6eb78989dbee5f850fab67