如何在Mac OSX上安装PostgreSQL-contrib-9.3? [英] How to install PostgreSQL-contrib-9.3 on Mac OSX?
问题描述
我试图在我的MacOSX 10.9.4上安装并运行PostgreSQL。
I'm trying to get PostgreSQL up and running on my MacOSX 10.9.4.
我按照下面列出的说明使用Homebrew成功安装了PostgreSQL本身:< a href = https://www.codefellows.org/blog/how-to-install-postgresql rel = nofollow noreferrer> https://www.codefellows.org/blog/how-to-install-postgresql 。它启动了,我可以使用 psql
命令连接到它。
I successfully installed PostgreSQL itself using Homebrew by following the instructions listed here: https://www.codefellows.org/blog/how-to-install-postgresql. It's up and I can connect to it using the psql
command.
但是,当我尝试创建postgis扩展名时,它会失败(请参见下文)。我了解我需要安装 postgresql-contrib-9.3
。
However, when I try to create the postgis extension, it fails (see below). I understand I need to install 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
。我所看到的说明完全不清楚如何安装。有人可以请教吗?
How can I install this postgresql-contrib-9.3
on Mac OSX? I don't have apt-get
. The instructions I have seen are not at all clear how to install it. Can someone please advise?
推荐答案
我在这里找到了答案: http://postgis.net/install :
I found the answer here: 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
这篇关于如何在Mac OSX上安装PostgreSQL-contrib-9.3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!