如何更改安装postgis的位置? Postgres [英] how to change install postgis location? postgres

查看:304
本文介绍了如何更改安装postgis的位置? Postgres的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在postgres数据库中并尝试为数据库创建扩展名时,出现此错误

When I am in my postgres db and tried to create an extension for my db, I get this error

ERROR: could not open extension control file "/usr/share/postgresql/9.5/extension/postgis.control": No such file or directory

我知道那里有很多关于此错误和解决方案的文章,我也都尝试过.在stackoverflow中发现了很多东西,但没有一个起作用.

I know there are so many posts out there with this error and solutions and I tried them all too. Found so much in stackoverflow but none of them worked.

我意识到在我的postgresql目录中有9.29.39.49.59.6

I realized in my postgresql directory there are 9.2, 9.3, 9.4, 9.5, 9.6,

我进入错误目录,我意识到9.5

I went into the directory in the error and I realized there is really no postgis.control inside 9.5

我检查了我的psql版本并显示9.6.1

I checked my psql version and showed 9.6.1

我进入了9.6文件夹,但确实看到了postgis.control.

I went into 9.6 folder and I DO see a postgis.control in it.

我想更改安装目录,以便在运行时

I want to changed the installation directory so when i run

create extension postgis

会的

"/usr/share/postgresql/9.6/extension/postgis.control"

代替

"/usr/share/postgresql/9.5/extension/postgis.control"

有人可以帮我吗?

谢谢.

P.S.使用Ubuntu 14.04,也将Ubuntu 16.04作为桌面,我还没有尝试安装Postgis

P.S. Using Ubuntu 14.04 and also have Ubuntu 16.04 as desktop which I haven't try to install postgis yet

推荐答案

您应使用以下命令:

sudo apt-get install postgresql-9.6-postgis-scripts

这篇关于如何更改安装postgis的位置? Postgres的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆