[Email protected]_id01_u4_19.116 software]# cat/etc/redhat-release
CentOS Release 6.8 (Final)
...
Compile error: Make: * * [sapi/cli/php] Error 1
Analysis
An error message appears in the [undefined reference to Libiconv_open '] subclass when compiling and installing PHP, indicating that the./configure did not grasp the environment variable value, the error occurred in the establishment of [-O-sapi/cli/php], did not give to Li The ICONV function library parameter for NK.
Solve
Edit Makefile File: Extra_libs = ...-lcrypt in the end add-liconv, for example: Extra_libs = ....-lcrypt-liconv and then re-make again.
Extended
The PHP installation does not php-fpm related files, this is the compilation parameter is less--ENABLE-FPM
Compile parameters
./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 \
You feel helpful, like Bai:)
Compile and install php5.6.30 error