安装libmemcached

libmemcached是一个c编写的高性能,线程安全的memcached客户端。

安装libmemcached

sudo apt-get install g++
sudo apt-get install libcloog-ppl0

因为会报错:

libmemcached/backtrace.cc:57:6: sorry, unimplemented: Graphite loop optimizations can only be used if the libcloog-ppl0 package is installed
libcloog-ppl0       

./configure --prefix=/duitang/dist/sys/libmemcached
make
make install

安装pylibmc

http://sendapatch.se/projects/pylibmc/

http://pypi.python.org/pypi/pylibmc

http://pypi.python.org/packages/source/p/pylibmc/pylibmc-1.2.3.tar.gz#md5=bfdcfef66a1bf260a65d2ffdcdd68466


sudo python setup.py install --with-libmemcached=/duitang/dist/sys/libmemcached

http://sendapatch.se/projects/pylibmc/
http://www.au92.com/archives/wrong-pylibmc-official-install-document.html

 

 

问题:

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

 

 

 sudo cp /duitang/dist/sys/libmemcached/lib/libmemcached.so /usr/local/lib/libmemcached.so

你可能感兴趣的:(memcached)