1、安装
打开MacBook命令行窗口,执行如下命令:
(1)查看可用版本Postgres
brew search postgresql
(2)安装Postgres
brew install postgresql@9.5 -v
如果顺利安装成功,将会在安装结束后输出如下信息:
If you need to have postgresql@9.5 first in your PATH run:
echo 'export PATH="/usr/local/opt/postgresql@9.5/bin:$PATH"' >> ~/.bash_profile
For compilers to find postgresql@9.5 you may need to set:
export LDFLAGS="-L/usr/local/opt/postgresql@9.5/lib"
export CPPFLAGS="-I/usr/local/opt/postgresql@9.5/include"
For pkg-co