使用自制软件在Mac上使用Postgresql安装PHP [英] Install PHP with Postgresql on MAC using homebrew

查看:88
本文介绍了使用自制软件在Mac上使用Postgresql安装PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用此教程

但是,由于我不想使用mysql和apache,因此在安装php 5.6时我使用了以下命令:

However, as I do not want to use mysql and apache, when installing php 5.6 I use this command :

brew install php56 --without-mysql --without-apache --with-pgsql=/Applications/Postgres.app/Contents/Versions/9.4/bin/

但是,我没有安装postgres支持。我经常看到的第一行是:

However, I does not install postgres support. The first line I see is all the time :

==> Installing php56 with --without-mysql, --without-apache

安装php56,但是关于--with- pgsql。

But nothing regarding --with-pgsql.

当我尝试不指定指向我的postgres应用程序的链接时,它告诉我找不到pg_config。它还告诉我--with-pgsql已被弃用,我必须使用--with-postgresql,但是最后,它并没有改变任何东西。

When I try not to specify the link towards my postgres app, it tells me it cannot find pg_config. It also told me that --with-pgsql is deprecated and that I have to use --with-postgresql but in the end, it does not change anything.

任何人都知道会发生什么情况?

As anyone any idea of what could go be going on ?

推荐答案

我找到了解决此问题的方法。我使用自制软件安装了postgresql(即使它已经安装在我的计算机上),然后使用以下命令行安装了php5.6:

I found a way to fix the problem. I installed postgresql with homebrew (even if it was already installed on my computer), then installed php5.6 with the following command line :

brew install php56 --without-mysql --without-apache --with-postgresql

然后我用自制软件卸载了PostgreSQL

Then I uninstall postgresql with homebrew

brew uninstall postgresql

最后我安装了php5.6 pdo-pgsql

And finally I installed php5.6 pdo-pgsql

brew install php56-pdo-pgsql

希望它会有所帮助!

这篇关于使用自制软件在Mac上使用Postgresql安装PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆