无法在 postgres 14 中创建扩展

问题描述 投票:0回答:1
running postgres 14 on REHL 8
I installed v14.

(我之前在这台服务器上有 v10,没有任何问题。不确定有什么不同)

我无法创建扩展——我错过了什么???

CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
returns:  ERROR:  could not access file "$libdir/uuid-ossp": No such file or directory 


select from pg_extension;
returns nothing   <<<<<<<<<<<<<<<<<---- why?????

[postgres@AFEBSPGSQLD01 data.14]$ /usr/pgsql-14/bin/pg_config --libdir
/usr/pgsql-14/lib
[postgres@AFEBSPGSQLD01 data.14]$ /usr/pgsql-14/bin/pg_config --sharedir
/usr/pgsql-14/share


extension definitions are in  /usr/pgsql-14/share/extension

我尝试将 uuid-ossp 复制到 /usr/pgsql-14/lib/extension 中,但没有任何改变。

谢谢,

Copied uuid-ossp into dirlib/extension
postgresql
1个回答
0
投票

要使用 PostgreSQL 的常见扩展,您必须安装版本 14 的

postgres-contrib
模块。因此:
postgresql14-contrib
用于 RHEL(我相信)。
uuid-ossp
不是 postgres 核心发行版的一部分,因此在使用包管理器时必须单独安装它。例如。

dnf install postgresql14-contrib

相关文档:

如果您使用预打包版本的 PostgreSQL,这些组件通常作为单独的子包提供,例如 postgresql-contrib。

https://www.postgresql.org/docs/current/contrib.html

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