使用pecl在osx上安装phpredis [英] Installing phpredis on osx with pecl

查看:213
本文介绍了使用pecl在osx上安装phpredis的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Mac OSX Maverics上安装phpredis时遇到一些麻烦.

I have some trouble installing phpredis on my Mac OSX Maverics.

我确实已安装并正在运行redis server.我使用sudo pecl install redis安装phpredis. 现在,当我这样做时,出现了以下情况:

I do have redis server installed and running. I used sudo pecl install redis to install phpredis. Now when I was doing that, this what came up:

running: make
/bin/sh /private/tmp/pear/temp/pear-build-rootEsw0Wz/redis-2.2.4/libtool --mode=compile cc  -I. -I/private/tmp/pear/temp/redis -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootEsw0Wz/redis-2.2.4/include -I/private/tmp/pear/temp/pear-build-rootEsw0Wz/redis-2.2.4/main -I/private/tmp/pear/temp/redis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/temp/redis/redis.c -o redis.lo
mkdir .libs
 cc -I. -I/private/tmp/pear/temp/redis -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootEsw0Wz/redis-2.2.4/include -I/private/tmp/pear/temp/pear-build-rootEsw0Wz/redis-2.2.4/main -I/private/tmp/pear/temp/redis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/redis/redis.c  -fno-common -DPIC -o .libs/redis.o
In file included from /private/tmp/pear/temp/redis/redis.c:27:
/private/tmp/pear/temp/redis/common.h:1:10: fatal error: 'php.h' file not found
#include "php.h"
         ^
1 error generated.
make: *** [redis.lo] Error 1
ERROR: `make' failed

这是怎么回事?由于缺少php.h文件,make之类的接缝失败了.但是为什么会这样,我该如何解决呢?

What's this all about? seams like make failed because of missing php.h file. But why is that and how can I solve this?

推荐答案

好像您的php在环境变量路径中不可用,或者安装正在从某个默认位置选择php.

Looks like your php is not available in environment variable path or installation is picking php from some default location.

这篇关于使用pecl在osx上安装phpredis的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆