Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have tried many times over to install Thrift ( in Ubuntu Server. I tried it on two machines... And one I had nothing on it before; meaning fresh Ubuntu installation.

I did: ./configure, no problems here.

But then if I run make, everything stops working:

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

If I try to install Python; I get:

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.

I have been search everywhere for an answer, but nothing. I am I the only one running into this problem? Is there a solution that exists? I am not sure I feel my legs anymore :\

Also, I tried to install php-dev but I get an error:

E: Unable to locate package php-dev

I was able to install: php5-dev, is there a difference?

Any help would be great thanks :|

share|improve this question
Possible duplicate of I cannot install Python modules – David Foerster Feb 23 at 10:05
This question is older. – jnbdz Feb 23 at 18:33
up vote 1 down vote accepted

Install python dev

sudo apt-get install python-dev
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.