gpt4 book ai didi

php - MAMP 上的 Gearman PECL 扩展

转载 作者:搜寻专家 更新时间:2023-10-31 22:05:03 24 4
gpt4 key购买 nike

我正在尝试使用 MAMP PRO 在 Mac OS X 上安装 Gearman。我使用 MAMP 的 PHP 5.4.4。我使用 Macports 安装了 Gearman

$ port install gearman

之后,我想安装PECL扩展,但安装出现以下错误;

$ sudo pecl install gearman-beta

WARNING: php_bin /Applications/MAMP/bin/php/php5.4.4/bin/php appears to have a suffix /php5.4.4/bin/php, but config variable php_suffix does not match
running: phpize
grep: /Applications/MAMP/bin/php/php5.4.4/include/php/main/php.h: No such file or directory
grep: /Applications/MAMP/bin/php/php5.4.4/include/php/Zend/zend_modules.h: No such file or directory
grep: /Applications/MAMP/bin/php/php5.4.4/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
building in /private/tmp/pear/install/pear-build-root1NxsrE/gearman-1.1.2
running: /private/tmp/pear/install/gearman/configure
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... i386-apple-darwin12.5.0
checking host system type... i386-apple-darwin12.5.0
checking target system type... i386-apple-darwin12.5.0
checking for PHP prefix... /Applications/MAMP/bin/php/php5.4.4
checking for PHP includes... -I/Applications/MAMP/bin/php/php5.4.4/include/php -I/Applications/MAMP/bin/php/php5.4.4/include/php/main -I/Applications/MAMP/bin/php/php5.4.4/include/php/TSRM -I/Applications/MAMP/bin/php/php5.4.4/include/php/Zend -I/Applications/MAMP/bin/php/php5.4.4/include/php/ext -I/Applications/MAMP/bin/php/php5.4.4/include/php/ext/date/lib
checking for PHP extension directory... /Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525
checking for PHP installed headers prefix... /Applications/MAMP/bin/php/php5.4.4/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 gearman support... yes, shared
found in /opt/local
checking for gearman_client_set_context in -lgearman... yes
checking for gearman_worker_set_server_option in -lgearman... yes
checking for gearman_job_error in -lgearman... yes
checking for gearman_client_unique_status in -lgearman... yes
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
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 dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin12.5.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/install/pear-build-root1NxsrE/gearman-1.1.2/libtool --mode=compile cc -I. -I/private/tmp/pear/install/gearman -DPHP_ATOM_INC -I/private/tmp/pear/install/pear-build-root1NxsrE/gearman-1.1.2/include -I/private/tmp/pear/install/pear-build-root1NxsrE/gearman-1.1.2/main -I/private/tmp/pear/install/gearman -I/Applications/MAMP/bin/php/php5.4.4/include/php -I/Applications/MAMP/bin/php/php5.4.4/include/php/main -I/Applications/MAMP/bin/php/php5.4.4/include/php/TSRM -I/Applications/MAMP/bin/php/php5.4.4/include/php/Zend -I/Applications/MAMP/bin/php/php5.4.4/include/php/ext -I/Applications/MAMP/bin/php/php5.4.4/include/php/ext/date/lib -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -Wall -c /private/tmp/pear/install/gearman/php_gearman.c -o php_gearman.lo
mkdir .libs
cc -I. -I/private/tmp/pear/install/gearman -DPHP_ATOM_INC -I/private/tmp/pear/install/pear-build-root1NxsrE/gearman-1.1.2/include -I/private/tmp/pear/install/pear-build-root1NxsrE/gearman-1.1.2/main -I/private/tmp/pear/install/gearman -I/Applications/MAMP/bin/php/php5.4.4/include/php -I/Applications/MAMP/bin/php/php5.4.4/include/php/main -I/Applications/MAMP/bin/php/php5.4.4/include/php/TSRM -I/Applications/MAMP/bin/php/php5.4.4/include/php/Zend -I/Applications/MAMP/bin/php/php5.4.4/include/php/ext -I/Applications/MAMP/bin/php/php5.4.4/include/php/ext/date/lib -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -Wall -c /private/tmp/pear/install/gearman/php_gearman.c -fno-common -DPIC -o .libs/php_gearman.o
/private/tmp/pear/install/gearman/php_gearman.c:16:10: fatal error: 'php.h' file not found
#include "php.h"
^
1 error generated.
make: *** [php_gearman.lo] Error 1
ERROR: `make' failed

如果我使用默认系统 PHP(5.3.26,位于/usr/bin/php)而不是 MAMP 的 5.4.4,sudo pecl install gearman-beta 会成功安装。但是我不能将 gearman.so 与 MAMP 5.4.4 一起使用,因为它们不是为相同的 PHP 版本构建的。

最佳答案

我遇到了这个问题,这是因为 MAMP 没有所有的 PHP 源。

我发现这个非常有用的解决方案解释了如何下载和配置它们:https://stackoverflow.com/a/11175197/369326

请注意,MAMP 组件不包含高于 php 5.4.10 的任何 PHP 版本的附加功能,但您可以从 http://php.net/releases 下载附加功能。 .

关于php - MAMP 上的 Gearman PECL 扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20284019/

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