安装pylibmc

首先需要安装libmemcached ,不要安装太新的版本,对gcc有要求

http://launchpad.net/libmemcached/1.0/0.51/+download/libmemcached-0.51.tar.gz

然后就可以安装了,

./configuare

make && sudo make install

之后用pip安装pylibmc, https://pypi.python.org/pypi/pylibmc

pip install pylibmc

 

 

装完后报错

>>> import pylibmc
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/python2.6/lib/python2.6/site-packages/pylibmc/__init__.py", line 70, in <module>
import _pylibmc
ImportError: libmemcached.so.8: cannot open shared object file: No such file or directory

 

把/usr/local/lib加入/etc/ld.so.conf,然后执行/sbin/ldconfig

 




fatkun

没有评论


You can leave the first : )



发表评论

电子邮件地址不会被公开。