Linux 安装php扩展curl

安装php扩展curl的时候

[root@localhost curl]# /home/web/php/bin/phpize

[root@localhost curl]# ./configure --with-php-config=/home/web/php/bin/php-config

报错如下

checking for cURL in default path... not found

configure:error:Pleasereinstallthelibcurldistribution-

easy.h should be in /include/curl/

解决办法:

# yum -y install curl-devel

然继续,done

[root@localhost curl]#make

[root@localhost curl]# cd modules/

[root@localhostmodules]#ls

curl.la  curl.so

接着把curl.so拷贝到php.ini里配置的extention_dir目录里,同时配置

extention=curl.so

重启apache

搞定!

相关推荐