在Linux下编译安装PHP的时候make报错,make: *** [sapi/fpm/php-fpm] Error 1
原因iconv重复安装在不同目录,造成include文件iconv.h等重复 通过 find / -name “iconv.h” 如果查找到2个以上返回结果,说明 iconv重复安装了,卸载多余的版本即可正常编译。
安装iconv是源码编译安装,于是到安装目录cd /usr/local/src/libiconv-1.13.1,执行 make uninstall卸载自己安装的版本。再重新
cd /usr/local/src/php-5.3.8,
./configure –prefix=/usr/local/php –with-config-file-path=/usr/local/php/etc –with-mysql=/usr/local/mysql –with-mysqli=/usr/local/mysql/bin/mysql_config –with-freetype-dir –with-jpeg-dir –with-png-dir –with-zlib –with-libxml-dir=/usr –enable-xml –disable-rpath –enable-discard-path –enable-safe-mode –enable-bcmath –enable-shmop –enable-sysvsem –enable-inline-optimization –with-curl –with-curlwrappers –enable-mbregex –enable-fastcgi –enable-fpm –enable-force-cgi-redirect –enable-mbstring –with-mcrypt –with-gd –enable-gd-native-ttf –with-openssl –with-mhash –enable-pcntl –enable-sockets –with-ldap –with-ldap-sasl –with-xmlrpc –enable-zip –enable-soap
make
make install