【发布时间】:2021-03-16 15:55:15
【问题描述】:
我正在尝试让 PostGIS 正常工作,但似乎 Postgresql 没有找到扩展名。我的服务器在 CentOS 8 上运行,Postgresql 版本为 12。我首先通过 dnf module enable postgresql:12 等安装了 Postgresql 12。
之后我安装了 PostGIS 并按照 PostGIS 网站 (https://people.planetpostgresql.org/devrim/index.php?/archives/102-Installing-PostGIS-3.0-and-PostgreSQL-12-on-CentOS-8.html) 上的说明进行操作。但是当我尝试运行CREATE EXTENSION postgis; 时,我收到错误ERROR: could not access file "$libdir/postgis-3": No such file or directory SQL state: 58P01 我发现所需的文件位于子目录“bitcode”中。因此,我尝试对上面 $libdir 目录中的内容进行符号链接 - 但没有帮助。即使将它们复制到目录中也没有 - 同样的错误。我错过了什么?
谢谢你和最好的问候, 格茨
【问题讨论】:
-
删除所有符号链接和您手动创建的其他内容。您找到的是一个不相关的文件。也许您将安装与 PGDG 二进制文件和您的发行版提供的二进制文件混合在一起。
rpm -qa|grep postgres能得到什么?该文件应位于/usr/pgsql-12/lib。 -
我得到:postgresql-12.1-2.module_el8.1.0+273+979c16e6.x86_64 postgresql12-12.5-1PGDG.rhel8.x86_64 postgresql12-contrib-12.5-1PGDG.rhel8.x86_64 postgresql12-libs- 12.5-1PGDG.rhel8.x86_64 postgresql12-server-12.5-1PGDG.rhel8.x86_64 postgresql-server-12.1-2.module_el8.1.0+273+979c16e6.x86_64
-
也许最好的办法是摆脱 Postgres 和 PostGIS - 并从头开始安装它。我应该吃什么?
标签: postgresql postgis centos8