安裝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: Please reinstall the libcurl distribution -
easy.h should be in /include/curl/
解決辦法:
# yum -y install curl-devel
然繼續,done
[root@localhost curl]#make
[root@localhost curl]# cd modules/
[root@localhost modules]# ls
curl.la curl.so
接着把curl.so拷貝到php.ini裏配置的extention_dir目錄裏,同時配置
extention=curl.so
重啓apache
搞定!