Lion上的MAMP中使用PECL安装OAUTH时遇到问题

Lion上的MAMP中使用PECL安装OAUTH时遇到问题

本文介绍了尝试在Mac OS Lion上的MAMP中使用PECL安装OAUTH时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是设置php服务器的新手,我走过其他相关的帖子,似乎没人能像我一样遇到相同的错误.我正在使用MAMP 2.0.2,并运行PHP 5.3.6,并且我正尝试使用以下命令在本地MAMP上安装oAuth:

i am new to setting php servers, and i had go though other related post, seems like nobody have the same error as i have.I am using MAMP 2.0.2, and running PHP 5.3.6,and I was trying to install oAuth on my local MAMP, using following commands:

$ cd /Applications/MAMP/bin/php/php5.3.6/bin
$ ./pecl install oauth

但是,它返回这样的错误:

however, it return such error:

Notice: unserialize(): Error at offset 276 of 1133 bytes in Config.php on line 1050
ERROR: The default config file is not a valid config file or is corrupted.

发生了什么事? PECL捆绑在MAMP中,应该可以立即使用....

What is happening? PECL is bundled in MAMP, which should be working out of the box....

更新:

我在其他地方阅读过一篇文章,提示配置文件中包含安装路径的数据不正确,因此我在以下文件中更改了一些值:

I read a post elsewhere suggest that the config file's data, which holds the install paths are in-correct, so i changed some value in the following file :

/Applications/MAMP/bin/php/php5.3.6/conf/pear.conf

然后,我使用命令:

$ ./pecl install oauth

它开始下载并解压缩,但是当它尝试安装时,它会给出:

Which it starts download and unpack, but when it try to install, it gives:

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/temp/pear-build-user1RU5EZA/oauth-1.2.2/libtool --mode=compile cc  -I. -I/private/tmp/pear/temp/oauth -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-user1RU5EZA/oauth-1.2.2/include -I/private/tmp/pear/temp/pear-build-user1RU5EZA/oauth-1.2.2/main -I/private/tmp/pear/temp/oauth -I/Applications/MAMP/bin/php/php5.3.6/include/php -I/Applications/MAMP/bin/php/php5.3.6/include/php/main -I/Applications/MAMP/bin/php/php5.3.6/include/php/TSRM -I/Applications/MAMP/bin/php/php5.3.6/include/php/Zend -I/Applications/MAMP/bin/php/php5.3.6/include/php/ext -I/Applications/MAMP/bin/php/php5.3.6/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall -g   -c /private/tmp/pear/temp/oauth/oauth.c -o oauth.lo
mkdir .libs
cc -I. -I/private/tmp/pear/temp/oauth -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-user1RU5EZA/oauth-1.2.2/include -I/private/tmp/pear/temp/pear-build-user1RU5EZA/oauth-1.2.2/main -I/private/tmp/pear/temp/oauth -I/Applications/MAMP/bin/php/php5.3.6/include/php -I/Applications/MAMP/bin/php/php5.3.6/include/php/main -I/Applications/MAMP/bin/php/php5.3.6/include/php/TSRM -I/Applications/MAMP/bin/php/php5.3.6/include/php/Zend -I/Applications/MAMP/bin/php/php5.3.6/include/php/ext -I/Applications/MAMP/bin/php/php5.3.6/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -g -c /private/tmp/pear/temp/oauth/oauth.c  -fno-common -DPIC -o .libs/oauth.o
In file included from /private/tmp/pear/temp/oauth/oauth.c:14:
/private/tmp/pear/temp/oauth/php_oauth.h:20:10:

fatal error: 'php.h' file not found

include "php.h"
     ^

1 error generated.

make: *** [oauth.lo] Error 1

ERROR: `make' failed

又发生了什么事?

推荐答案

我知道这很旧,但是在遇到类似问题时发现了这个问题.

I know this is old but I found this question while having a similar issue.

07-25 19:08