作者:IvyShao520 | 来源:互联网 | 2023-09-14 11:06
我正在尝试按照这里的说明安装pylibmc:http:sendapatch.seprojectspylibmcinstall.html我从这里下载了最新版本的pylibmc:htt
我正在尝试按照这里的说明安装pylibmc:
http://sendapatch.se/projects/pylibmc/install.html
我从这里下载了最新版本的pylibmc:http://pypi.python.org/pypi/pylibmc
我从这里下载了libmemcached(0.51):http://launchpad.net/libmemcached/1.0/0.51/+download/libmemcached-0.51.tar.gz
我正在运行Ubuntu 10.04,我也尝试在Debian Lenny VM上安装它.
这是我得到的错误:
atif@atif-laptop:~/pylibmc-1.2.2$python setup.py install --with-libmemcached=/home/atif/libmemcached-0.51
running install
running build
running build_py
running build_ext
building '_pylibmc' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DUSE_ZLIB -I/home/atif/libmemcached-0.51/include -I/usr/include/python2.6 -c _pylibmcmodule.c -o build/temp.linux-i686-2.6/_pylibmcmodule.o -fno-strict-aliasing
In file included from _pylibmcmodule.c:34:
_pylibmcmodule.h:41:20: error: Python.h: No such file or directory
In file included from _pylibmcmodule.c:34:
_pylibmcmodule.h:85: error: expected specifier-qualifier-list before ‘PyObject’
_pylibmcmodule.h:103: error: expected specifier-qualifier-list before ‘PyObject’
_pylibmcmodule.h:111: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
我不知道为什么会这样说:_pylibmcmodule.h:41:20:错误:Python.h:没有这样的文件或目录
我究竟做错了什么?
解决方法:
听起来你错过了python开发头文件.
sudo apt-get install python2.7-dev
但是改为正确的python版本