LoginSignup
0
0

More than 5 years have passed since last update.

MAMP付属のpeclが動かない

Posted at

前提:RockMongo入れよう→php_mongoが無いと言われた→sudo pecl install mongoで躓いた

〈以下、バージョン番号は適宜読み替えて〉

$ /Applications/MAMP/bin/php/php5.2.17/bin/pecl
Notice: unserialize(): Error at offset 267 of 1133 bytes in Config.php on line 1050

みたいなエラー
→ pear.conf が原因。

... s:7:"php_dir";s:35:"/Applications/MAMP/bin/php/php5.2.17/lib/php"; ...

のように、本当の長さは44なのにs:35となっていたりするので正しい文字列長に直す。
参考:http://forum.mamp.info/viewtopic.php?t=13815#p29192

あと、pecl install する時に php.h が無いとか言われる系は http://www.mamp.info/en/downloads/index.html から
MAMP_components_2.0.2.zip
を貰ってきて展開してその中の php-5.2.17.tar.gz から

$ tar zxf php-5.2.17.tar.gz
$ mkdir /Applications/MAMP/bin/php/php5.2.17/include
$ mv php-5.2.17 /Applications/MAMP/bin/php/php5.2.17/include/php

みたいな。
参考:http://thomashunter.name/blog/getting-the-php-mongodb-driver-installed-with-mamp-on-os-x/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0