yum -y install openssl-devel tar xf curl-7.39.0.tar.gz cd curl-7.39.0 ./configure --prefix=/path/lib/curl --with-ssl make make install
重启php就可以(如果不行,那就重新安装一下php。php编译安装参数必须包含--with-curl=/path/lib/curl/)
php编译参数如下:
./configure --prefix=/path/php5.6.11 --with-mysql=/path/mysql --with-mysqli --with-gd --with-iconv-dir=/path/lib/libiconv --with-freetype-dir=/path/lib/freetype/ --with-mysql-sock=/path/mysql/mysql.sock --with-jpeg-dir=/path/lib/jpeg --with-png-dir=/path/lib/libpng --with-zlib-dir=/path/lib/zlib/ --with-libxml-dir=/path/lib/libxml2/ --enable-xml --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curlwrappers --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl-dir=/path/lib/openssl/ --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext=/path/gettext --enable-session --with-mcrypt=/wdzj/lnmp/lib/libmcrypt/ --with-curl=/wdzj/lnmp/lib/curl/ CFLAGS=-I/wdzj/lnmp/lib/zlib/ LDFLAGS=-L/wdzj/lnmp/lib/zlib/lib
时间: 2024-10-17 06:17:19