使用自制软件在 MAC 上安装 PHP 和 Postgresql
Install PHP with Postgresql on MAC using homebrew
我正在尝试使用自制软件安装 PHP 5.6 和 Postgresql tutorial。
但是,因为我不想使用 mysql 和 apache,所以在安装 php 5.6 时我使用了这个命令:
brew install php56 --without-mysql --without-apache --with-pgsql=/Applications/Postgres.app/Contents/Versions/9.4/bin/
但是,我没有安装 postgres 支持。我看到的第一行总是:
==> Installing php56 with --without-mysql, --without-apache
但与 --with-pgsql 无关。
当我尝试不为我的 postgres 应用程序指定 link 时,它告诉我找不到 pg_config。它还告诉我 --with-pgsql 已被弃用,我必须使用 --with-postgresql 但最后,它没有改变任何东西。
任何人都知道会发生什么吗?
我找到了解决问题的方法。我用自制软件安装了 postgresql(即使它已经安装在我的电脑上),然后使用以下命令行安装 php5.6:
brew install php56 --without-mysql --without-apache --with-postgresql
然后我用自制软件卸载 postgresql
brew uninstall postgresql
最后我安装了 php5.6 pdo-pgsql
brew install php56-pdo-pgsql
希望对您有所帮助!
我正在尝试使用自制软件安装 PHP 5.6 和 Postgresql tutorial。
但是,因为我不想使用 mysql 和 apache,所以在安装 php 5.6 时我使用了这个命令:
brew install php56 --without-mysql --without-apache --with-pgsql=/Applications/Postgres.app/Contents/Versions/9.4/bin/
但是,我没有安装 postgres 支持。我看到的第一行总是:
==> Installing php56 with --without-mysql, --without-apache
但与 --with-pgsql 无关。
当我尝试不为我的 postgres 应用程序指定 link 时,它告诉我找不到 pg_config。它还告诉我 --with-pgsql 已被弃用,我必须使用 --with-postgresql 但最后,它没有改变任何东西。
任何人都知道会发生什么吗?
我找到了解决问题的方法。我用自制软件安装了 postgresql(即使它已经安装在我的电脑上),然后使用以下命令行安装 php5.6:
brew install php56 --without-mysql --without-apache --with-postgresql
然后我用自制软件卸载 postgresql
brew uninstall postgresql
最后我安装了 php5.6 pdo-pgsql
brew install php56-pdo-pgsql
希望对您有所帮助!