如何创建从给定的 postgis 安装到 macos 中的 postgresql@13 版本的符号链接?

问题描述 投票:0回答:1

我已经使用

postgresql@13
在 macos Sonoma 14.1.1 上安装了
brew install...
和 postgis。默认安装的postgis版本是
3.3.4_1
,它与postgresql@14一起使用,因此它也安装了它。

我遇到的问题是,当启动 postgresql@13 后在

CREATE EXTENSION postgis;
上运行
psql -U postgres
时,我得到:

ERROR:  could not open extension control file "/opt/homebrew/opt/postgresql@13/share/postgresql@13/extension/postgis.control": No such file or directory

我读到我必须创建一个从给定的 postgis 安装到所需的 postgresql@13 的符号链接。但我不知道该怎么做。

有人可以提供一些帮助吗。

提前致谢。

postgresql macos postgis postgresql-13 macos-sonoma
1个回答
0
投票

您无法使用不同的 PostgreSQL 版本加载为一个主要 PostgreSQL 版本构建的库。有一个特殊的保护措施可以防止这会导致类似的错误

ERROR:  incompatible library "postgis.so": version mismatch
DETAIL:  Server is version 13, library is version 14.

所以不要尝试用符号链接搞乱安装。如果找不到合适的二进制包,您可以从源代码构建 PostGIS。

© www.soinside.com 2019 - 2024. All rights reserved.