在mac OS lion上的MAMP中尝试使用PECL安装OAUTH时遇到问题
我是设置php服务器的新手,我已经浏览了其他相关帖子,似乎没有人有与我相同的错误。我正在使用MAMP 2.0.2,并运行PHP 5.3.6,并且我正在尝试使用以下命令在本地MAMP上安装oAuth:
$ cd /Applications/MAMP/bin/php/php5.3.6/bin
$ ./pecl install oauth
但是,它会返回这样的错误:
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中,它应该开箱即用。
更新:
我在其他地方读到一篇文章,建议配置文件的数据(保存安装路径)不正确,因此我在以下文件中更改了一些值:
/Applications/MAMP/bin/php/php5.3.6/conf/pear.conf
然后,我使用命令:
$ ./pecl install oauth
它开始下载和解压缩,但是当它尝试安装时,它会给出:
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
再说一遍,发生了什么?