【发布时间】:2016-05-18 10:53:23
【问题描述】:
我使用 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
但它似乎已经在我的系统中。我做错了什么?
【问题讨论】:
-
你也试过安装
libpython3-dev吗? -
通常缺少 python-dev 库。你确定配置使用python 3而不是python 2吗?因为如果是这种情况,您应该安装
python-dev而不是python3-dev。 @NilsWerner python3-dev 应该安装libpython3-dev作为依赖项。 -
好吧,如果它是我的猜测也是 Python 2/3 配置问题。
-
你需要 python-dev 而不是 python3-dev。守望者使用python2
-
@Tomax,所以你是对的,这就是问题所在 - 我必须安装 python 2
dev,现在它可以工作了。谢谢!