使用pecl在osx上安装phpredis

编程入门 行业动态 更新时间:2024-10-28 14:23:56
本文介绍了使用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

本文发布于:2023-10-20 01:01:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1509359.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:pecl   osx   phpredis

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!