问题描述
我有 Linux Mint 19.2
,我在其中安装了最新的 PostgreSQL 12:
I have Linux Mint 19.2
where I installed the newest PostgreSQL 12 using:
sudo apt-get install postgresql
同样,我使用以下方法安装了最新的 Postgis 3.0.1:
Similarly, I installed the newest Postgis 3.0.1 using:
sudo apt-get install postgis
我设置了 postgres 帐户和所有内容,并想创建 PostGIS 的扩展.因此,我还必须安装 postgresql-12-postgis-3-scripts
,它将 postgis.control 添加到 PostgreSQL 安装中.
I setup postgres account and everything and wanted to create an extension of PostGIS. I thus had to install also postgresql-12-postgis-3-scripts
, which added postgis.control into PostgreSQL installation.
然后我连接到我的 postgres
帐户,创建并初始化了一个 test
数据库并尝试创建扩展 postgis
.答案是:
I then connected to my postgres
account, created and initialised a test
database and attempted to create extension postgis
. The answer was:
错误:无法访问文件$libdir/postgis-3":没有那个文件或目录
PostgreSQL 和 PostGIS 都是全新安装的.我的计算机上没有损坏的依赖项或旧的 PostgreSQL 片段...我错过了什么?提前致谢.
Both PostgreSQL and PostGIS were fresh installs. I have no broken dependencies or old PostgreSQL fragments on my computer...What am I missing? Thanks in advance.
推荐答案
欢迎来到 SO.
你很接近.尝试像这样在 PostgreSQL 12 中安装 postgis
:
You were close. Try installing postgis
in your PostgreSQL 12 like this:
sudo apt-get install postgresql-12-postgis-3
之后你就可以成功运行
CREATE EXTENSION postgis;
这篇关于PostgreSQL 12 和 PostGIS 3.0.1:错误:无法访问文件“$libdir/postgis-3":Linux 上没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!