Postgres-xl上的PostGIS扩展

时间:2018-08-03 17:22:33

标签: postgresql postgis postgres-xl

我正在尝试在AWS上使用Postgres-XL部署PostGIS集群,为此,我具有下一个架构:

SO:ubuntu
1个GTM(172.31.45.190)
1个协调员(172.31.45.191)
2个数据节点(172.31.45.192和172.31.45.193)

我的集群正在运行,但是我无法使PostGIS工作,我尝试使用sudo apt-get install postgis进行安装,但是当我尝试在数据库(CREATE EXTENSION postgis;)中创建扩展名时,下一个错误:

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

postgis.control安装的apt-get文件位于"/usr/share/postgresql/9.5/extension/postgis.control"中,因此我认为路径问题不大,但我对该配置有些迷茫

在此先感谢您的帮助!

2 个答案:

答案 0 :(得分:0)

您使用的是PostgreSQL版本(在本例中为PostgreSQL-XL),该版本是从Ubuntu存储库以外的其他位置(类似于this issue)安装的。 a#close-button是为PostgreSQL安装配置的:host >>> a#close-button /*.close-cross-link*/ { border: 1px solid black; width: 100px; height: 100px; opacity: 0.3; background-color:white; position:relative; top:-15px; left:-15px; /*border-radius:50%; /*makes a circle*/ } :host >>> a#close-button:hover /*.close-cross-link:hover */{ opacity: 1; } :host >>> a#close-button:before, :host >>> a#close-button:after /*.close-cross-link:before, .close-cross-link:after*/ { display:inline-block;/*need display+relative+left or absolute+left*/ position:relative; left: 13px; border: 1px solid black; top:0px; right:0px; content: ''; height: 31px; width: 2px; background-color: #333; border-radius:50%; /*makes cross sharper*/ } :host >>> a#close-button:before /*.close-cross-link:before */{ transform: rotate(45deg); } :host >>> a#close-button:after /*.close-cross-link:after*/ { transform: rotate(-45deg); } 。 Ubuntu上PostgreSQL 9.5的默认值应为backtrace。据我所知bt是在编译时配置的,不能轻易更改。

PostGIS已针对将要使用的PostgreSQL版本进行编译。因此,在这种情况下,PostGIS的Ubuntu版本将与您正在运行的PostgreSQL-XL版本不兼容。

您有两种方法可以解决此问题:

  • 从Ubuntu软件存储库中安装PostgreSQL(确保先备份数据库!),然后使用它代替PostgreSQL-XL。
  • PostGIS manually安装到PostgreSQL-XL中。

答案 1 :(得分:0)

万一有人在这个问题上运行,我按照以下步骤解决:

  1. 安装Postgres-xl和PostGIS依赖项以进行编译(请确保在此步骤中安装软件包postgresql-server-dev-9.5,否则将阻止您的postgres-xl安装)
  2. 使用./configure -prefix=/usr/lib/postgresql/9.5构建并安装Postgres-XL
  3. 构建和安装PostGIS
  4. 启动集群
相关问题