[[email protected]_id01_u4_19.116 Software]# cat /etc/redhat-release CentOS release 6.8 (Final)...编译报错:make: *** [sapi/cli/php] Error 1
- 分析
在编译安装php时出现 [undefined reference to libiconv_open']子类的错误信息,表示在 ./configure 没抓好些环境变数值,错误发生点在建立 [ -o sapi/cli/php], 没给到要 link的iconv 函数库参数。 - 解决
编辑Makefile 文件中:EXTRA_LIBS = ..... -lcrypt 在最后加上 -liconv,例如: EXTRA_LIBS = ..... -lcrypt -liconv 然后重新再次 make 即可。 - 扩展
php 安装之后没有php-fpm相关的文件,这是编译参数少了--enable-fpm - 编译参数
./configure \--prefix=/usr/local/Software/php5.6.30 \--with-mysql=/usr/local/Software/mysql \--with-apxs2=/usr/local/Software/apache2/bin/apxs \--with-iconv-dir=/usr/local/libiconv \--with-freetype-dir \--with-jpeg-dir \--with-png-dir \--with-zlib \--with-libxml-dir=/usr\--enable-xml \--disable-rpath \--enable-safe-mode \--enable-bcmath \--enable-shmop \--enable-sysvsem \--enable-inline-optimization \--with-curl \--with-curlwrappers \--enable-mbregex \--enable-fpm \--enable-mbstring \--with-mcrypt \--with-gd \--enable-gd-native-ttf \--with-openssl \--with-mhash \--enable-pcntl \--enable-sockets \--with-xmlrpc \--enable-zip \--enable-soap \--enable-short-tags \--enable-zend-multibyte \--enable-static \--with-xsl \--with-fpm-user=www \--with-fpm-group=www\--enable-ftp \
您觉得有帮助,点赞呗 :)
原文地址:http://blog.51cto.com/zhagyilig/2055485
时间: 2024-10-07 05:43:53