本文介绍了创建扩展 postgis 失败,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 Ubuntu 18.04
上使用 psql (PostgreSQL) 12.2 (Ubuntu 12.2-2.pgdg18.04+1)
运行 temba=# create extension postgis;
失败并出现以下错误
Running temba=# create extension postgis;
fails with the following error
ERROR: could not open extension control file "/usr/share/postgresql/10/extension/postgis.control": No such file or directory
我运行 find/usr -name postgis.control
只是为了发现 postgis.control
位于名为 12
的文件夹中,而不是 10
I ran find /usr -name postgis.control
only to find out postgis.control
is inside a folder named 12
instead of 10
laptop@xyz-x:~$ find /usr -name postgis.control
/usr/share/postgresql/12/extension/postgis.control
编辑 1
我已经运行了sudo apt-get install postgis
Reading package lists... Done
Building dependency tree
Reading state information... Done
postgis is already the newest version (3.0.1+dfsg-2.pgdg18.04+1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
推荐答案
我运行了这个 sudo apt install postgis postgresql-10-postgis-2.5
并且它工作了
I ran this sudo apt install postgis postgresql-10-postgis-2.5
and it worked
这篇关于创建扩展 postgis 失败,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!