简体   繁体   English

使用自制软件在MAC上使用Postgresql安装PHP

[英]Install PHP with Postgresql on MAC using homebrew

I am trying to install PHP 5.6 with Postgresql using homebrew using this tutorial . 我正在尝试使用本教程使用自制程序安装带有Postgresql的PHP 5.6。

However, as I do not want to use mysql and apache, when installing php 5.6 I use this command : 但是,因为我不想使用mysql和apache,所以在安装php 5.6时我使用这个命令:

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

However, I does not install postgres support. 但是,我没有安装postgres支持。 The first line I see is all the time : 我看到的第一行是:

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

But nothing regarding --with-pgsql. 但没有关于--with-pgsql。

When I try not to specify the link towards my postgres app, it tells me it cannot find pg_config. 当我尝试不指定我的postgres应用程序的链接时,它告诉我它找不到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. 它还告诉我--with-pgsql已被弃用,我必须使用--with-postgresql但最终它不会改变任何东西。

As anyone any idea of what could go be going on ? 任何人都知道会发生什么事吗?

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 : 我用自制软件安装了postgresql(即使它已经安装在我的电脑上),然后使用以下命令行安装php5.6:

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

Then I uninstall postgresql with homebrew 然后我用自制软件卸载postgresql

brew uninstall postgresql

And finally I installed php5.6 pdo-pgsql 最后我安装了php5.6 pdo-pgsql

brew install php56-pdo-pgsql

Hope it will help ! 希望它会有所帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM