2009-12-19 3 views
9

शीर्षक में pecl_http स्थापित करना शीर्षक के अनुसार, मैं बस उबंटू में php के लिए pecl_http एक्सटेंशन स्थापित करने का प्रयास कर रहा हूं।xubuntu

तो मैं क्या सबसे समझ में आता है क्या किया:

[email protected] ~ $ sudo pecl install pecl_http 
downloading pecl_http-1.6.6.tgz ... 
Starting to download pecl_http-1.6.6.tgz (173,645 bytes) 
.....................................done: 173,645 bytes 
71 source files, building 
running: phpize 
Configuring for: 
PHP Api Version:   20041225 
Zend Module Api No:  20060613 
Zend Extension Api No: 220060519 
1. whether to enable cURL HTTP requests; specify libcurl directory : yes 

1-1, 'all', 'abort', or Enter to continue: 
1. whether to enable support for gzencoded/deflated message bodies; specify zlib directory : yes 

1-1, 'all', 'abort', or Enter to continue: 
1. whether to enable response content type guessing; specify libmagic directory : no 

1-1, 'all', 'abort', or Enter to continue: 
1. whether to depend on extensions which have been built shared : yes 

1-1, 'all', 'abort', or Enter to continue: 
building in /var/tmp/pear-build-root/pecl_http-1.6.6 
running: /tmp/pear/temp/pecl_http/configure --with-http-curl-requests --with-http-zlib-compression --with-http-magic-mime=no --with-http-shared-deps 

checking for grep that handles long lines and -e... /bin/grep 
checking for egrep... /bin/grep -E 
checking for a sed that does not truncate output... /bin/sed 
checking for gcc... gcc 

.... <snip> 

checking for unistd.h... (cached) yes 
checking for gethostname... yes 
checking for getdomainname... yes 
checking for getservbyport... yes 
checking for getservbyname... yes 
checking for zlib.h... found in /usr 
checking for zlib version >= 1.2.0.4... 1.2.3.3 
checking for curl/curl.h... not found 
configure: error: could not find curl/curl.h 
ERROR: `/tmp/pear/temp/pecl_http/configure --with-http-curl-requests --with-http-zlib-compression --with-http-magic-mime=no --with-http-shared-deps' failed 

तो ठीक है, मैं प्रणाली में कर्ल की जरूरत नहीं है, इसलिए मैं

[email protected] ~ $ sudo apt-get install php5-curl 

कर्ल ठीक स्थापित करते हैं, तो मैं स्थापित करने की कोशिश की php5-http फिर से, लेकिन फिर भी वही त्रुटि।

कोई भी प्रकाश साझा कर सकता है? :(

-aw

उत्तर

19

संदेश मिल रहा है का संकेत नहीं है कि PHP कर्ल पैकेज याद आ रही है।

इसके बजाय, समस्या यह है कि आप "प्रणाली" कर्ल है लगता नहीं है - पैकेज या कम से कम, नहीं अपने "विकास" संस्करण में, कि pecl_http संकलित करने के लिए आवश्यक फ़ाइलें एक त्वरित apt-cache search से आंकना शामिल

:

$ LANG=en apt-cache search libcurl dev 
libcurl4-gnutls-dev - Development files and documentation for libcurl (GnuTLS) 
libcurl4-openssl-dev - Development files and documentation for libcurl (OpenSSL) 
... 

आपको शायद libcurl4-gnutls-dev या libcurl4-openssl-dev इंस्टॉल करना होगा।
(पिछली बार मैं पीएचपी संकलित, मैं उन लोगों में से पहले एक स्थापित किया है, और यह मेरे कर्ल समर्थन सक्षम के साथ पीएचपी संकलन करने की अनुमति दी)

+0

कि इसे हल, अपने शीघ्र उत्तर के लिए धन्यवाद के: डी। –

+0

आपका स्वागत है :-) मज़े करो! –

10

या .. बस sudo apt-get install libcurl3-devcurl/curl.h प्रदान करेगा और अपने pecl_http स्थापना

जारी रहेगा
1

यह मेरा उबंटू 12,10

sudo apt-get install libcurl3-openssl-dev 
sudo pecl install -a pecl_http 

sudo sh -c "echo 'extension=http.so' > /etc/php5/mods-available/http.ini" 
sudo ln -s /etc/php5/mods-available/http.ini /etc/php5/conf.d/ 

आप अपने वेब सर्वर को पुनः आरंभ करने की आवश्यकता होगी पर काम किया जाता है, इस मॉड्यूल लोड करने के लिए।

sudo service apache2 restart 
or 
sudo service nginx restart 
संबंधित मुद्दे