简体   繁体   English

在Mac OS X上使用MAMP和PHP 5.3的Memcache

[英]Memcache with MAMP and PHP 5.3 on Mac OS X

I would like to install the PHP Memcache extension to my MAMP server (v1.9.1 with PHP 5.3.2). 我想将PHP Memcache扩展安装到我的MAMP服务器(带有PHP 5.3.2的v1.9.1)。 To do this I've followed the steps in the installation instruction here: http://www.lullabot.com/articles/setup-memcached-mamp-sandbox-environment 为此,我已按照此处的安装说明进行操作: http : //www.lullabot.com/articles/setup-memcached-mamp-sandbox-environment

When running ./pecl i memcache it results in an error: 当运行./pecl i memcache将导致错误:

./pecl: line 28: /Applications/MAMP/bin/php5.3/bin/php: Permission denied ./pecl:第28行:/Applications/MAMP/bin/php5.3/bin/php:权限被拒绝

./pecl: line 28: exec: /Applications/MAMP/bin/php5.3/bin/php: cannot execute: Unknown error: 0 ./pecl:第28行:exec:/Applications/MAMP/bin/php5.3/bin/php:无法执行:未知错误:0

Running sudo ./pecl i memcache doesn't work, too. 运行sudo ./pecl i memcache也不起作用。 Did you have the same trouble and how did you solve it? 您有同样的麻烦吗?如何解决?

I have not installed Xcode, or should I do? 我尚未安装Xcode,还是应该安装?

Best Regards, Jim 最好的问候,吉姆

Right now what helped me was this GitHub project: https://github.com/majksner/php-memcached-mamp 现在,对我有帮助的是这个GitHub项目: https//github.com/majksner/php-memcached-mamp

In its README you can find instructions about dependencies, which can be installed using homebrew. 在其自述文件中,您可以找到有关依赖项的说明,可以使用自制软件进行安装。

If you haven't installed Xcode, then you can't compile c programs. 如果尚未安装Xcode,则无法编译c程序。 More specifically, you need to install the Unix development tools package from Xcode. 更具体地说,您需要从Xcode安装Unix开发工具包。 Which I am actually do at this moment. 目前我实际上在做什么。 I had Xcode installed, but not the Unix development tools. 我安装了Xcode,但没有安装Unix开发工具。

I'm following the instructions from here to install memcache and PHP. 我正在按照此处的说明安装内存缓存和PHP。 http://www.glenscott.co.uk/blog/2009/08/30/install-memcached-php-extension-on-os-x-snow-leopard/ http://www.glenscott.co.uk/blog/2009/08/30/install-memcached-php-extension-on-os-x-snow-leopard/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM