postgresql 9.3.3自制操作系统x 10.10的postgis 2.1不兼容

postgresql 9.3.3自制操作系统x 10.10的postgis 2.1不兼容,postgresql,osx-yosemite,postgis,Postgresql,Osx Yosemite,Postgis,我已经从OSX10.9升级到约塞米蒂10.10。我正在用postgis 2.1运行postgresql 9.3.3。在升级到OS X 10.10之前,我没有做pgdump(我知道,我知道,杀了我…),但我有原始的数据目录。我安装了一个brew postgresql并获得了9.4.4。因此,我用自制软件安装了Postgresql 9.3.9(我能找到的唯一9.3版本)。还可以安装postgis。然后我得到了Postgresql 9.4.4的版本2.1 Postgis。我试图安装postgis20,

我已经从OSX10.9升级到约塞米蒂10.10。我正在用postgis 2.1运行postgresql 9.3.3。在升级到OS X 10.10之前,我没有做pgdump(我知道,我知道,杀了我…),但我有原始的数据目录。我安装了一个brew postgresql并获得了9.4.4。因此,我用自制软件安装了Postgresql 9.3.9(我能找到的唯一9.3版本)。还可以安装postgis。然后我得到了Postgresql 9.4.4的版本2.1 Postgis。我试图安装postgis20,但这不适用于我的数据库

当我启动Postgresql 9.3.3时,我可以看到我的所有数据库,但当我浏览时,我会发现错误:

ERROR:  could not access file "$libdir/postgis-2.1": No such file or directory
我试图链接到$libdir目录中的posts-2.1,但随后收到以下消息:

ERROR:  incompatible library     "/usr/local/Cellar/postgresql93/9.3.9/lib/postgis-2.1.so": version mismatch
DETAIL:  Server is version 9.3, library is version 9.4.
所以很明显,我需要Postgresql 9.3的postgis-2.1,但我不知道如何修复它

如果我尝试运行pg_dumpall,我会得到这个错误(我想很明显):

那么,如何让postgis-2.1再次与postgresql 9.3.3配合使用呢?
在homebrew中,我只找到postgresql94的postgis-2.1。

使用
brew编辑postgis
将安装脚本中的
postgresql
引用更改为
postgresql93
,然后运行
brew安装postgis
。您可能还需要使用
brew link postgresql93
brew unlink postgresql

链接/取消链接postgresql,谢谢。我确信这会起作用,但事实上我确实在
中安装了PostgreSQL 9.3.9和Postgis 2.1http://www.kyngchaos.com/software/postgres
。数据目录与“原始”版本配合得很好。然后我进行了备份/导出,并使用
brew install
@Joey安装了PostgreSQL 9.4和Postgis,您提到了在公式文件中更新对
PostgreSQL
的引用。您能否更明确地说明引用的位置?您可以为
postgresql
对文件进行grep,以找到要替换为
postgresql93
➜ ./pg_dumpall >> old_backup.sql                                                                                             
pg_dump: Dumping the contents of table "darwin_test" failed: PQgetResult() failed.
pg_dump: Error message from server: ERROR:  could not load library "/usr/local/Cellar/postgresql/9.3.3/lib/postgis-2.1.so": dlopen(/usr/local/Cellar/postgresql/9.3.3/lib/postgis-2.1.so, 10): Symbol not found: _json_tokener_errors
Referenced from: /usr/local/Cellar/postgresql/9.3.3/lib/postgis-2.1.so
Expected in: /usr/local/lib/libjson-c.2.dylib
in /usr/local/Cellar/postgresql/9.3.3/lib/postgis-2.1.so