2016-05-18 36 views
11

我使用Linux Mint 17'Quiana',我想安装Watchman以便稍后使用Ember.js。这里是我的步骤:安装Watchman时无法找到“Python.h”文件

$ git clone https://github.com/facebook/watchman.git 

然后

$ cd watchman 
$ ./autogen.sh 
$ ./configure.sh 

,当我跑make编译文件时,它返回以下错误:

pywatchman/bser.c:31:20: fatal error: Python.h: no such file or directory 
#include <Python.h> 
       ^
compilation terminated. 
error: command 'i686-linux-gnu-gcc' failed with exit status 1 
make[1]: *** [py-build] Error 1 
make[1]: Leaving the directory `/home/alex/watchman' 
make: *** [all] Error 2 

我试图运行

$ sudo apt-get install python3-dev 

但它似乎已经在我的系统中。我做错了什么?

+0

您是否尝试过安装'libpython3-dev',太? –

+1

通常它的python-dev库缺失。 你确定配置使用python 3而不是python 2吗?因为如果是这种情况,你应该安装'python-dev'而不是'python3-dev'。 @NilsWerner python3-dev应该将'libpython3-dev'安装为依赖项。 – Tomax

+0

那么如果它的确我猜也会是一个Python 2/3配置问题。 –

回答

28

通常它的python-dev库缺失。你确定配置使用python 3而不是python 2吗?因为如果是这种情况,你应该安装python-dev而不是python3-dev

+0

谢谢你试一试。希望这可以工作 – Pavan

+1

在Fedora 24上,你需要'sudo dnf install python-devel'。 – donleche

+0

CENTOS的'sudo yum install python-devel' – Billz

7

同样的问题,如果你建立在rasbian /覆盆子下的守望者。安装“python-dev”。

-

git clone https://github.com/facebook/watchman.git 
cd watchman 
./autogen.sh 
./configure 
make 

sudo make install 
相关问题