gpt4 book ai didi

mamp - 在哪里可以找到 MAMP 服务器组件和库

转载 作者:行者123 更新时间:2023-12-04 10:50:58 29 4
gpt4 key购买 nike

我正在尝试在 MAMP php 中安装 pecl_http。
我收到以下错误。

grep: /Applications/MAMP/bin/php/php5.5.10/include/php/main/php.h: No such file or directory
grep: /Applications/MAMP/bin/php/php5.5.10/include/php/Zend/zend_modules.h: No such file or directory
grep: /Applications/MAMP/bin/php/php5.5.10/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:



对此进行了研究,发现我们需要 MAMP 服务器组件和库。

下载完这个组件后,找到我的PHP版本对应的zip文件,解压到你的PHP安装目录下,运行configure脚本。

我看到的所有帖子都指向这个链接 http://www.mamp.info/en/downloads/ .但我在那里找不到任何东西。在其他几个链接中,我找到了旧版本 php(直到 5.3)的组件。

这个安装依赖的东西太多,需要很多时间。请让我知道,如果有人知道我在哪里可以找到这些 MAMP SERVER 组件和库 PHP5.5.10

附加在我的终端中创建的大部分输出行仅供引用。

$ sudo pecl install pecl_http
Password:
downloading pecl_http-2.0.6.tgz ...
Starting to download pecl_http-2.0.6.tgz (152,827 bytes)
......................done: 152,827 bytes
downloading raphf-1.0.4.tgz ...
Starting to download raphf-1.0.4.tgz (7,232 bytes)
...done: 7,232 bytes downloading propro-1.0.0.tgz ...
Starting to download propro-1.0.0.tgz (6,217 bytes)
...done: 6,217 bytes 4 source files, building WARNING: php_bin /Applications/MAMP/bin/php/php5.5.10/bin/php appears to have a suffix /php5.5.10/bin/php, but config variable php_suffix does not match
running: phpize grep: /Applications/MAMP/bin/php/php5.5.10/include/php/main/php.h: No such file or directory
grep: /Applications/MAMP/bin/php/php5.5.10/include/php/Zend/zend_modules.h: No such file or directory
grep: /Applications/MAMP/bin/php/php5.5.10/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version: Zend Module Api No: Zend Extension Api No: whether to enable raphf support [yes] : yes building in /usr/local/pear/pear-build-rootXNkOc5/raphf-1.0.4 running: /usr/local/pear/raphf/configure --enable-raphf=yes 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-darwin12.5.0 checking host system type... x86_64-apple-darwin12.5.0 checking target system type... x86_64-apple-darwin12.5.0 checking for PHP prefix... /Applications/MAMP/bin/php/php5.5.10 checking for PHP includes... -I/Applications/MAMP/bin/php/php5.5.10/include/php -I/Applications/MAMP/bin/php/php5.5.10/include/php/main -I/Applications/MAMP/bin/php/php5.5.10/include/php/TSRM -I/Applications/MAMP/bin/php/php5.5.10/include/php/Zend -I/Applications/MAMP/bin/php/php5.5.10/include/php/ext -I/Applications/MAMP/bin/php/php5.5.10/include/php/ext/date/lib checking for PHP extension directory... /Applications/MAMP/bin/php/php5.5.10/lib/php/extensions/no-debug-non-zts-20121212 checking for PHP installed headers prefix... /Applications/MAMP/bin/php/php5.5.10/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 raphf support... yes, shared checking for ld used by cc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... no
...............
^
1 error generated.
make: *** [php_propro.lo] Error 1
ERROR: `make' failed
64 source files, building

1 error generated.
make: *** [php_http_buffer.lo] Error 1
ERROR: `make' failed

最佳答案

从与此类问题相关的一些现有帖子中获得了一些提示。
我在 http://us2.php.net/get/php-5.5.10.tar.gz/from/a/mirror 中找到了 php5.5.10 的组件

按照以下步骤在 Mac OS 10.8 上的 MAMP 上安装 pecl_http:

Install brew
Install autoconf using brew brew install autoconf
Download the source code for PHP 5.5.10 (or whatever version you are using) from php.net
Extract the source code into /Applications/MAMP/bin/php/php5.5.10/include
Rename the extracted file from "php-5.5.10" to "php"
cd /Applications/MAMP/bin/php/php5.5.10/include/php
Run ./configure
Add extension=http.so to my php.ini file
Restart MAMP

我的所有扩展都已安装。

特别感谢 joshua.paling 和 user387049 提供上述所有信息。

关于mamp - 在哪里可以找到 MAMP 服务器组件和库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24375772/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com