PostGIS Homebrew安装是否引用旧路径? [英] PostGIS Homebrew installation referencing an old path?
问题描述
我升级并随后重新安装了PostGIS& OS X Mountain Lion上的PostgreSQL.尝试使用PostGIS扩展时,出现以下错误:
I upgraded and subsequently reinstalled PostGIS & PostgreSQL on OS X Mountain Lion. When trying to use the PostGIS extensions, I receive the following error:
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版本:
It appears that PostGIS (and PostgreSQL as well??) are still looking for the required files in the /postgresql/9.2.3/
directory and not in the /postgresql/9.2.4/
directory. I have used Homebrew to remove all previous versions of PostgreSQL via the following command:
brew remove --force postgresql
有人可以为我指出正确原因的原因吗? (某处或某处必须有一个挥之不去的配置文件?)
Could someone please point me in the right directions as to why this problem is occurring? (There must be a lingering config file somewhere or something?)
任何帮助将不胜感激.
Any help will be much appreciated.
推荐答案
问题是您有一个运行在代码库9.2.3版上的psql服务器.要对此进行测试,请加载一个psql控制台,您应该在顶部看到它:
The problem is you have a psql server running on version 9.2.3 of the codebase. To test for this, load up a psql console and you should see this at the top:
psql (9.2.4, server 9.2.3)
Type "help" for help.
请注意上面的服务器9.2.3"注释.如果您运行的是服务器的正确版本,则会看到以下内容:
Note the "server 9.2.3" comment above. If you're running the proper version of your server, you would see this instead:
psql (9.2.4)
Type "help" for help.
要解决此问题,只需按照brew info postgresql
给出的有关卸载和加载LaunchAgent的说明进行操作-这将使用新代码重新启动服务器:
To fix this, just follow the instructions given by brew info postgresql
on unloading and loading the LaunchAgent - this will restart the server with the new code:
To reload postgresql after an upgrade:
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
这篇关于PostGIS Homebrew安装是否引用旧路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!