我刚刚升级到MacOS小牛(10.9),我正在使用Postgres.app安装。
我按照Enabling PostgreSQL support in PHP on Mac OS X答案中的说明使PGSQL再次可访问。我包含了--with=/path/ to / pgsql选项,以解决“无法找到libpq-fe.h”错误,并且成功地启用了pgsql访问。
然而,当我开始配置pdo_pgsql时,我得到了“无法找到libpq-fe.h”错误,尽管它与我在上面的pgsql配置中一样指定了安装路径。
下面是成功的pgsql配置的一个片段--注意pg_config check响应中的双斜杠。
pgsql$ ./configure --with-pgsql=/Applications/Postgres.app/Contents/MacOS/bin/
<...>
checking for pg_config... /Applications/Postgres.app/Contents/MacOS/bin//pg_config
<...>“pg_config”应该出现在以下位置:
$ ls /Applications/Postgres.app/Contents/MacOS/bin/pg_conf*
/Applications/Postgres.app/Contents/MacOS/bin/pg_config但是,在配置pdo_pgsql时,根本找不到pg_config。
pdo_pgsql$ ./configure --with-pgsql=/Applications/Postgres.app/Contents/MacOS/bin/
<...>
checking for pg_config... not found
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path我尝试指定带有和不带尾斜杠的路径,以及使用或不使用bin目录的路径,所有这些路径都使用pgsql,而没有一个使用pdo_pgsql。
发布于 2015-02-09 17:50:34
$./configure --with-pdo-pgsql=/Applications/Postgres.app/Contents/Versions/9.4对我起作用了。
https://stackoverflow.com/questions/20272731
复制相似问题