我想在EC2上做这个,使用amazon linux的微型实例
我安装并启动了memcached服务,没有任何问题。 但是当试图使用pecl的PHP部分告诉我pecl没有安装。 所以我安装了梨,然后pecl,当试图运行pecl安装memcache我有一个错误要求zlib(这btw,安装),所以而是我做到了这一点:
wget http://pecl.php.net/get/memcache-2.2.5.tgz tar xvf memcache-2.2.5.tgz cd memcache-2.2.5 phpize ./configure --with-zlib-dir=/usr/share/syslinux/com32/
但是当我做“make”的时候,我得到一长串的错误,所有这些都在“zend”文件中,大部分都是缺失的types(即uint,hash_func_t等)。
我的猜测是,其他东西需要安装(即所有types的包含文件要求),所以我不必自己定义所有缺less的types
In file included from /usr/include/php/Zend/zend.h:237, from /usr/include/php/main/php.h:35, from /usr/local/src/memcache-2.2.5/memcache.c:26: /usr/include/php/Zend/zend_alloc.h:49: error: expected specifier-qualifier-list before 'uint' In file included from /usr/include/php/Zend/zend.h:270, from /usr/include/php/main/php.h:35, from /usr/local/src/memcache-2.2.5/memcache.c:26: /usr/include/php/Zend/zend_hash.h:45: error: expected declaration specifiers or '...' before '*' token /usr/include/php/Zend/zend_hash.h:45: error: expected declaration specifiers or '...' before 'uint' /usr/include/php/Zend/zend_hash.h:45: error: 'ulong' declared as function returning a function /usr/include/php/Zend/zend_hash.h:55: error: field 'h' declared as a function /usr/include/php/Zend/zend_hash.h:56: error: expected specifier-qualifier-list before 'uint' /usr/include/php/Zend/zend_hash.h:67: error: expected specifier-qualifier-list before 'uint' /usr/include/php/Zend/zend_hash.h:87: error: expected specifier-qualifier-list before 'uint' /usr/include/php/Zend/zend_hash.h:99: error: expected declaration specifiers or '...' before 'uint' /usr/include/php/Zend/zend_hash.h:99: error: expected declaration specifiers or '...' before 'hash_func_t' In file included from /usr/include/php/Zend/zend.h:270, from /usr/include/php/main/php.h:35, from /usr/local/src/memcache-2.2.5/memcache.c:26: /usr/include/php/Zend/zend_hash.h:100: error: expected declaration specifiers or '...' before 'uint' /usr/include/php/Zend/zend_hash.h:100: error: expected declaration specifiers or '...' before 'hash_func_t'
等等…(错误列表很长…)
简单地安装php-pecl-memcache而不是编译一个呢?