我曾多次尝试安装Thrift(http://thrift.apache.org/) 在 Ubuntu Server 中。我在两台机器上尝试过它……其中一台我之前没有安装过;这意味着全新安装 Ubuntu。
我做到了:./configure
,这里没有问题。
但如果我运行make
,一切都会停止工作:
creating build/temp.linux-i686-2.6
creating build/temp.linux-i686-2.6/src
creating build/temp.linux-i686-2.6/src/protocol
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c src/protocol/fastbinary.c -o build/temp.linux-i686-2.6/src/protocol/fastbinary.o
src/protocol/fastbinary.c:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
make[3]: *** [all-local] Error 1
make[3]: Leaving directory `/root/thrift-0.6.0/lib/py'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/thrift-0.6.0/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/thrift-0.6.0'
make: *** [all] Error 2
如果我尝试安装 Python;我得到:
apt-get install python2.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
python2.6 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
我到处寻找答案,但一无所获。只有我一个人遇到这个问题吗?有解决方案吗?我不确定我是否还能感觉到我的腿了:\
另外,我尝试安装php-dev
但收到错误:
E: Unable to locate package php-dev
我能够安装:php5-dev
,有什么区别吗?
任何帮助都将非常感谢:|
答案1
安装 python dev
sudo apt-get install python-dev