簡體   English   中英

安裝錯誤:pecl_http

[英]Installation Error: pecl_http

我試圖在Mac上安裝peel_http擴展名,現在很頭疼。 我遵循了本教程http://php-osx.liip.ch/,但是當我給出命令/usr/local/php5/bin/pecl install pec_http ,它給了我錯誤,這是我的終端堆棧。 我真的很想盡快開始。 另外,如果他們有其他解決辦法,這比這更好,請Pll建議我。 這是我的籌碼。

sh-3.2# sudo /usr/local/php5/bin/pecl install pecl_http
No releases available for package "pecl.php.net/pecl_http"
install failed
sh-3.2# apachectl start 
sh-3.2# export PATH=/usr/local/php5/bin:$PATH
sh-3.2# echo "$PATH"
/usr/local/php5/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/milind/Library/Android/sdk/platform-tools/
sh-3.2# /usr/local/php5-5.5.27-20150710-230047/bin/pecl install pecl_http
downloading pecl_http-2.5.3.tgz ...
Starting to download pecl_http-2.5.3.tgz (191,863 bytes)
.........................................done: 191,863 bytes
64 source files, building
running: phpize
Configuring for:
PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212 
where to find zlib [/usr] : 
where to find libcurl [/usr] : 
where to find libevent [/usr] : 
where to find libidn [/usr] : 
building in /private/tmp/pear/temp/pear-build-rootFpNzEE/pecl_http-2.5.3
running: /private/tmp/pear/temp/pecl_http/configure --with-http-zlib-dir=/usr --with-http-libcurl-dir=/usr --with-http-libevent-dir=/usr --with-http-libidn-dir=/usr
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin15.0.0
checking host system type... x86_64-apple-darwin15.0.0
checking target system type... x86_64-apple-darwin15.0.0
checking for PHP prefix... /usr/local/php5
checking for PHP includes... -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php5/lib/php/extensions/no-debug-non-zts-20121212
checking for PHP installed headers prefix... /usr/local/php5/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable extended HTTP support... yes, shared
checking for egrep... (cached) /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for off_t... yes
checking for mbstate_t... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for unistd.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking for gethostname... yes
checking for getdomainname... yes
checking for mbrtowc... yes
checking for mbtowc... yes
checking for iswalnum... yes
checking for inet_pton... yes
checking for idna.h... not found
checking for idn2.h... not found
checking unicode/uidna.h usability... no
checking unicode/uidna.h presence... no 
checking for unicode/uidna.h... no
checking for uidna_IDNToASCII... no
checking for __uidna_IDNToASCII... no
checking for uidna_IDNToASCII in -licucore... yes
checking for zlib.h... not found
configure: error: could not find zlib.h
ERROR: `/private/tmp/pear/temp/pecl_http/configure --with-http-zlib-dir=/usr --with-http-libcurl-dir=/usr --with-http-libevent-dir=/usr --with-http-libidn-dir=/usr' failed

我真的不知道該怎么解決。 各種幫助將不勝感激。 非常感謝。

我在OSX中安裝時遇到了類似的問題。 我不確定您的OSX版本。

更新Xcode,然后安裝“用於Xcode的命令行工具(OS X)”。

您可以嘗試輸入終端:

xcode-select --install

如果您在下載時遇到麻煩,可以在Apple Dev中下載它,但是您將需要一個免費的Apple Developer帳戶才能登錄並下載命令行工具。 他們有一個新的Apple Developers下載站點,您可以在其中下載和安裝Xcode的命令行工具(OS X Mavericks)。

這是鏈接:

https://developer.apple.com/xcode/download/

安裝命令行工具后,

sudo pecl install pecl_http 

我重新啟動了apache,很高興去!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM