php的memcached扩展
来源:互联网 发布:麒麟与ubuntu的区别 编辑:程序博客网 时间:2024/05/29 03:56
1。安装libmemcached
下载 libmemcached1.0.16:
wget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz
tar -xzf libmemcached-1.0.16.tar.gz
./configure -prefix=/usr/local/libmemcached -with-memcached=/usr/local/memcached/bin/memcached
make
出现如下错误
make -j3 all-ammake[1]: Entering directory `/root/soft/libmemcached-1.0.16' CXX libhashkit/libmemcached_libmemcached_la-aes.lo CXX libhashkit/libmemcached_libmemcached_la-algorithm.lo CXX libhashkit/libmemcached_libmemcached_la-behavior.lo CXX libhashkit/libmemcached_libmemcached_la-crc32.lo CXX libhashkit/libmemcached_libmemcached_la-digest.lo CXX libhashkit/libmemcached_libmemcached_la-encrypt.lo CXX libhashkit/libmemcached_libmemcached_la-fnv_32.lo CXX libhashkit/libmemcached_libmemcached_la-fnv_64.lo CXX libhashkit/libmemcached_libmemcached_la-function.lo CXX libhashkit/libmemcached_libmemcached_la-has.lo CXX libhashkit/libmemcached_libmemcached_la-hashkit.lo CXX libhashkit/libmemcached_libmemcached_la-jenkins.lo CXX libhashkit/libmemcached_libmemcached_la-ketama.lo CXX libhashkit/libmemcached_libmemcached_la-md5.lo CXX libhashkit/libmemcached_libmemcached_la-murmur.lo CXX libhashkit/libmemcached_libmemcached_la-murmur3.lo CXX libhashkit/libmemcached_libmemcached_la-one_at_a_time.lo CXX libhashkit/libmemcached_libmemcached_la-murmur3_api.lo CXX libhashkit/libmemcached_libmemcached_la-rijndael.lo CXX libhashkit/libmemcached_libmemcached_la-str_algorithm.lo CXX libhashkit/libmemcached_libmemcached_la-strerror.lo CXX libhashkit/libmemcached_libmemcached_la-string.lo CXX libhashkit/libmemcached_libmemcached_la-nohsieh.lo CXX libmemcached/libmemcached_libmemcached_la-allocators.lo CXX libmemcached/libmemcached_libmemcached_la-analyze.loIn file included from ./libmemcached/common.h:114, from libmemcached/analyze.cc:1:./libmemcached-1.0/memcached.h:46:27: error: tr1/cinttypes: No such file or directoryIn file included from ./libmemcached/common.h:114, from libmemcached/allocators.cc:38:./libmemcached-1.0/memcached.h:46:27: error: tr1/cinttypes: No such file or directorymake[1]: *** [libmemcached/libmemcached_libmemcached_la-analyze.lo] 错误 1make[1]: *** 正在等待未完成的任务....make[1]: *** [libmemcached/libmemcached_libmemcached_la-allocators.lo] 错误 1make[1]: Leaving directory `/root/soft/libmemcached-1.0.16'make: *** [all] 错误 2
经查,发现是gcc版本问题
于是先更新gcc版本
yum install gcc44 gcc44-c++ libstdc++44-devel
export CC=/usr/bin/gcc44
export CXX=/usr/bin/g++44
重新执行libmemcached 的 configure:
./configure -prefix=/usr/local/libmemcached -with-memcached=/usr/local/memcached/bin/memcached
make
make install成功了
2。安装php的memcached扩展
cd memcached-1.4.5;
执行了几次/usr/local/php/bin/phpize,都报如下错误
Cannot find config.m4. Make sure that you run '/usr/local/php/bin/phpize' in the top level source directory of the module
后来发现这个不是php的memcached的扩展目录,然后找到memcached的php扩展目录memcached-1.0.2,苍天,我哪儿知道这个是memcached的php扩展目录啊,我还以为是低版本的memcached软件的源代码目录呢。
cd memcached-1.0.2;
执行
/usr/local/php/bin/phpize
世界变得美好了,先把结果拷贝到一个记事本里
然后执行./configure --with-php-config=/usr/local/php/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached
命运依然多舛,又报错
make: *** [php_memcached.lo] 错误 1
发现是libmemcached版本过高,换低版本
然后继续configure,make ,make install
成功,真不容易
然后在php.ini中增加extension = "memcached.so"
重启php-fpm和webserver(我这边用的是nginx)
- php的memcached扩展
- PHP Memcached的扩展
- php扩展memcached的安装
- 基于libmemcached,php扩展memcached的安装
- PHP扩展memcache与memcached的区别
- PHP中编译Memcached的扩展
- PHP扩展memcache和memcached的区别
- php使用memcached扩展的一个BUG
- php的memcache和memcached扩展区别
- php扩展Memcache和Memcached的区别
- PHP安装 memcached扩展遇到的坑
- php的memcache和memcached扩展区别
- PHP使用Memcached扩展的一个坑
- php的memcache和memcached扩展区别
- Linux 安装mongodb,memcached 的PHP扩展
- php的memcache和memcached扩展区别
- php的两个memcached扩展:memcache和memcached
- php的两个memcached扩展:memcache和memcached(二)
- gcc 中参数-ftest-coverage -fprofile-arcs 使用
- Android SMS 从备份恢复后,会把手机原有信息删除掉
- iPhone文件读写系统操作
- 【note】stm32 keilMDK出现warning: function XX declared implicitly
- Console程序中取得窗口句柄
- php的memcached扩展
- 大中型网站使用图片域名的必要性原因(firebug Blocking)
- JavaScript AMD规范简介(一)
- jni
- Android 数据连接关闭的情况下如何让彩信发不出去
- NEU-1459: 奇怪的取石子
- HTML5中标签input标签number判断
- filezilla 响应:425 Can't open data connection.错误:读取目录列表失败的解决办法
- Android WindowManager及其动画问题