我试图在CentOS-8中安装PostgreSQL12,我根据postgresql.org网站https://www.postgresql.org/download/linux/redhat/添加了postgresql存储库。
dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm所以现在我添加了存储库
[root@centos8cmd ~]# dnf repolist
Last metadata expiration check: 0:08:03 ago on Tue 08 Oct 2019 03:29:54 AM GMT.
repo id repo name status
AppStream CentOS-8 - AppStream 4,928
BaseOS CentOS-8 - Base 2,713
*epel Extra Packages for Enterprise Linux 8 - x86_64 1,816
extras CentOS-8 - Extras 3
pgdg10 PostgreSQL 10 for RHEL/CentOS 8 - x86_64 509
pgdg11 PostgreSQL 11 for RHEL/CentOS 8 - x86_64 531
pgdg12 PostgreSQL 12 for RHEL/CentOS 8 - x86_64 382
pgdg94 PostgreSQL 9.4 for RHEL/CentOS 8 - x86_64 188
pgdg95 PostgreSQL 9.5 for RHEL/CentOS 8 - x86_64 327
pgdg96 PostgreSQL 9.6 for RHEL/CentOS 8 - x86_64 487
[root@centos8cmd ~]#但是当我试图启动命令时
dnf install postgresql12
dnf install postgresql12-server我收到了以下信息!!
No match for argument: postgresql12
Error: Unable to find a match发布于 2019-10-08 10:02:18
试着:
sudo dnf --repo pgdg12 install postgresql12-server.x86_64
sudo dnf --repo pgdg12 list如果没有--repo pgdg12,这对我来说是行不通的。
还在寻找这种行为的原因..。
发布于 2019-10-08 21:40:19
另一种更舒适的解决方案:将module_hotfixes=true添加到pgdg定义中,或者禁用如果使用pgdg (dnf -y module disable postgresql)可能永远不想使用的AppStream模块。
据我所知,这是必要的,因为EL8引入了新的模块系统。
默认情况下,如果dnf检测到pgdg包提供的东西也在模块中,但没有打包为适当的模块,那么pgdg包就会被过滤。
我不知道如何在yum中定义模块,但是如果pgdg这样做,可能没有它就有可能,或者更好地将它们作为像其他AppStream模块那样的模块来处理(至少类似于afaik,模块版本不是为并行安装而设计的,而是仅供主要版本选择使用)。或者,如果他们要更改他们的包签名(我认为它与postgresql相关),过滤器将不会在默认情况下过滤它们。
发布于 2019-11-14 17:00:59
您需要在pgdg中禁用postgresql流模块,解锁pgdg中的postgres包:
dnf module disable postgresql有关详细信息,请参阅PostgreSQL on CentOS 8和RHEL 8
https://unix.stackexchange.com/questions/545635
复制相似问题