簡體   English   中英

安裝 Watchman 時找不到“Python.h”文件

[英]Can't find “Python.h” file while installing Watchman

我使用 Linux Mint 17 'Quiana' 並且我想安裝 Watchman 以在以后使用 Ember.js。 這是我的步驟:

$ 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

但它似乎已經在我的系統中。 我做錯了什么?

通常它缺少python-dev庫。 你確定配置使用 python 3 而不是 python 2? 因為如果是這種情況,您應該安裝python-dev而不是python3-dev

如果你在 rasbian/raspberry 下構建 watchman,同樣的問題。 安裝“python-dev”。

——

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

sudo make install

我也做了

sudo apt-get install python3-dev

它仍然給我錯誤然后我運行了這個命令

sudo apt-get install python-dev

在那之后。

make 
sudo make install

在 Fedora 32 上運行: sudo dnf install python-devel

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM