我尝试使用brew安装postgresql,结果是
checking for libperl... yes
checking Python.h usability... no
checking Python.h presence... no
checking for Python.h... no
configure: error: header file <Python.h> is required for Python
在出现此错误后,我安装了Python,并说:
brew install python
Warning: python-2.7.5 already installed, it's just not linked
我需要做什么? 感谢
答案 0 :(得分:0)
你必须告诉Homebrew链接Python:
$ brew link python
在您这样做之前,它只是安装在/usr/local/Cellar
下的某个地方,但没有链接到/usr/local/bin
(例如/usr/local/bin/python
)和朋友。
这种情况发生的原因是Python似乎只是作为依赖项安装,但所请求的软件包(PostgreSQL)的安装失败,因此它的依赖项被保留但没有链接(即激活)。