环境:CentOS release 6.5 (Final)
PHP版本:7.0.2
7.0.4也可以
参数如下:
./configure --prefix=/usr/local/php \ --with-config-file-path=/usr/local/php/etc \ --enable-inline-optimization \ --disable-debug \ --disable-rpath \ --enable-shared \ --enable-opcache \ --enable-fpm \ --with-fpm-user=php-fpm \ --with-fpm-group=php-fpm \ --enable-mysqlnd \ --with-mysqli \ --with-pdo-mysql=/usr/local/mysql \ --with-gettext \ --enable-mbstring \ --with-iconv \ --with-mcrypt \ --with-mhash \ --with-openssl \ --enable-bcmath \ --enable-soap \ --with-libxml-dir \ --enable-pcntl \ --enable-shmop \ --enable-sysvmsg \ --enable-sysvsem \ --enable-sysvshm \ --enable-sockets \ --with-curl \ --with-zlib \ --enable-zip \ --with-bz2 \ --with-readline \ --with-gd \ --with-jpeg-dir \ --with-png-dir \ --with-freetype-dir \ --with-iconv-dir \ --enable-gd-native-ttf \ --enable-ftp \ --enable-exif --with-openssl-dir=/usr/lib/openssl
编译参数中得mysql和openssl路径换成你的实际位置。
OpenSSL support => disabled (install ext/openssl)
这个错误多半是openssl编译的时候没有指明openssl的路径。
下面是一个类似缺少 readline 的错误。
On Centos:
sudo yum install readline-devel
On Ubuntu:
sudo apt-get install libreadline-dev