我正在尝试在我的 MacOSX 10.9.4 上启动并运行 PostgreSQL。
我按照此处列出的说明使用 Homebrew 成功安装了 PostgreSQL 本身:https://www.codefellows.org/blog/how-to-install-postgresql .它启动了,我可以使用 psql
命令连接到它。
但是,当我尝试创建 postgis 扩展时,它失败了(见下文)。我知道我需要安装 postgresql-contrib-9.3
。
$ psql -d mydb
psql (9.3.5)
Type "help" for help.
mydb=# CREATE EXTENSION postgis;
ERROR: could not open extension control file "/usr/local/Cellar/postgresql/9.3.5/share/postgresql/extension/postgis.control": No such file or directory
如何在 Mac OSX 上安装此 postgresql-contrib-9.3
?我没有 apt-get
。我看到的说明根本不清楚如何安装它。有人可以建议吗?
最佳答案
我在这里找到了答案:http://postgis.net/install :
$ brew install postgis
<SNIP SNIP>
$ psql -d mydb
psql (9.3.5)
Type "help" for help.
dbname=# CREATE EXTENSION postgis;
CREATE EXTENSION
关于macos - 如何在 Mac OSX 上安装 PostgreSQL-contrib-9.3?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25467789/