postgresql – PostGIS Homebrew安装引用旧路径?

升级并随后重新安装PostGIS& OS X Mountain Lion上的Postgresql.尝试使用PostGIS扩展时,收到以下错误
ERROR: Could not open extension control file "/usr/local/Cellar/postgresql/
9.2.3/share/postgresql/extension/postgis.control": No such file or directory

似乎PostGIS(和Postgresql以及??)仍在/postgresql/9.2.3/目录中查找所需文件,而不是在/postgresql/9.2.4/目录中查找.我使用Homebrew通过以下命令删除所有以前版本的Postgresql

brew remove --force postgresql

有人可以指出我正确的方向为什么会出现这个问题? (某处或某处必须有一个挥之不去的配置文件?)

任何帮助都感激不尽.

问题是您在代码库的9.2.3版上运行了psql服务器.要测试这个,请加载一个psql控制台,你应该在顶部看到这个:
psql (9.2.4,server 9.2.3)
Type "help" for help.

请注意上面的“服务器9.2.3”注释.如果您运行的是正确版本的服务器,则会看到以下内容

psql (9.2.4)
Type "help" for help.

解决此问题,只需按照brew info postgresql给出的说明卸载并加载LaunchAgent – 这将使用新代码重新启动服务器:

To reload postgresql after an upgrade:
    launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

相关文章

最近做自动化测试时,深感自己对前端涉猎太少,加上对这块比...
homebrew本身就是一个git仓库。使用homebrew安装软件包时,会...
一、Homebrew安装、卸载等命令Homebrew的安装和卸载都非常简...
在mac系统中,使用homebrew可以很方便的管理包。按照官网的说...
我按照说明从这里使用brew安装mysqlhttps://gist.github.com...
我在macOS10.12.4上安装了nginx1.10.3和php5.5.38作为开发服...