【问题标题】:I'm trying to install postgresql by using brew but it cannot find Python.h我正在尝试使用 brew 安装 postgresql 但找不到 Python.h
【发布时间】:2013-10-02 16:13:55
【问题描述】:

我尝试使用 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

我需要做什么? 谢谢

【问题讨论】:

    标签: python macos postgresql homebrew


    【解决方案1】:

    你必须告诉 Homebrew 链接 Python:

    $ brew link python
    

    在你这样做之前,它只是安装在/usr/local/Cellar 下的某个位置,但没有链接到/usr/local/bin(例如/usr/local/bin/python)和朋友。

    出现这种情况的原因是 Python 似乎只是作为依赖安装的,但是请求的包(PostgreSQL)的安装失败,所以它的依赖被安装但没有链接(即激活)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-28
      • 2014-01-02
      • 2012-12-04
      • 2015-03-13
      • 1970-01-01
      • 1970-01-01
      • 2015-10-04
      • 1970-01-01
      相关资源
      最近更新 更多