Installing pylibmc on Ubuntu

2019-02-05 13:22发布

When running

pip install pylibmc

on Ubuntu, I get the following error:

_pylibmcmodule.h:42:36: fatal error: libmemcached/memcached.h: No such file or directory

3条回答
干净又极端
2楼-- · 2019-02-05 13:45
sudo apt-get install libmemcached-dev zlib1g-dev
查看更多
一夜七次
3楼-- · 2019-02-05 13:48

Zags answer didn't do the trick for me on Ubuntu 13.10. libmemcached-dev had already been installed. I had to also do:

sudo apt-get install zlib1g-dev

Maybe that will help someone else.

查看更多
别忘想泡老子
4楼-- · 2019-02-05 13:50

Install libmemcached using below command

sudo apt-get install libmemcached-dev zlib1g-dev

Then set the environment variable and install

LIBMEMCACHED=/opt/local pip install pylibmc
查看更多
登录 后发表回答