【发布时间】:2017-05-30 16:33:27
【问题描述】:
当我在我的 postgres 数据库中并尝试为我的数据库创建扩展时,我收到此错误
ERROR: could not open extension control file "/usr/share/postgresql/9.5/extension/postgis.control": No such file or directory
我知道有很多关于这个错误和解决方案的帖子,我也都试过了。在 stackoverflow 中找到了很多,但没有一个有效。
我意识到在我的postgresql 目录中有9.2,9.3,9.4,9.5,9.6,
进入错误目录,发现9.5里面真的没有postgis.control
我检查了我的 psql 版本并显示 9.6.1
我进入了9.6 文件夹,我确实在其中看到了postgis.control。
我想更改安装目录,所以当我运行时
create extension postgis
会过去的
"/usr/share/postgresql/9.6/extension/postgis.control"
而不是
"/usr/share/postgresql/9.5/extension/postgis.control"
有人可以帮帮我吗?
提前致谢。
附:使用 Ubuntu 14.04 并且还有 Ubuntu 16.04 作为桌面,我还没有尝试安装 postgis
【问题讨论】:
-
PostGIS 包特定于 Postgres 版本。您只需为 9.5 安装一个(例如
postgresql-9.5-postgis-2.3)。
标签: database postgresql ubuntu postgis