2016-05-18 39 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 
相關問題