error: C++ compiler cannot create executables….
安装相关开发包:
- yum install gcc gcc-c++ gcc-g77 autoconf automake flex bison bzip2-devel zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel
Debian:
- apt-get install gcc g++ build-essential
VPS为了保证效率和最小化安装,很多东西都没有所以出现上面的错误,有个偷懒的方法就是:
- yum groupinstall ‘Development Tools’
这样和我们本地安装时勾选development tools的效果是一样的,什么编辑器啊,make,automake之类的都有了。
configure: error: *** libmcrypt was not found
安装libmcypt时,用默认的./configure && make && make install后,在下一步安装mcrypt会出现上面的错误,并不是libmcypt 没有安装好,而是没有加到默认的path中,做个软连接即可:
- ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
编译PHP带上–with-xmlpr参数时出现:configure: error: XML configuration could not be found 错误
- yum -y install libxml2 libxml2-devel
Notice: Following unknown configure options were used:
- –enable-fastcgi
- –enable-force-cgi-redirect
- –enable-discard-path
php 5.3.0 发现在默认状态下,已经开始支持 fastcgi了,不用再费劲再写配置参数了,如果写了,会提示如上错误信息
undefined reference to libiconv_open错误
打开Makefile大约在85行的EXTRA_LIBS = ….. -lcrypt 在最后加上 -liconv,例如:EXTRA_LIBS = ….. -lcrypt -liconv然后重新再次 make 即可