环境: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