我正在尝试在 CentOS-8 中安装 postgresql-12 我根据postgresql.org
网站 添加了 postgresql 存储库https://www.postgresql.org/download/linux/redhat/
dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Run Code Online (Sandbox Code Playgroud)
所以现在我添加了存储库
[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 ~]#
Run Code Online (Sandbox Code Playgroud)
但是当我尝试启动命令时
dnf install postgresql12
dnf install postgresql12-server
Run Code Online (Sandbox Code Playgroud)
我收到以下消息!!
No match for argument: postgresql12
Error: Unable to find a match
Run Code Online (Sandbox Code Playgroud)
小智 1
尝试 :
sudo dnf --repo pgdg12 install postgresql12-server.x86_64
sudo dnf --repo pgdg12 list
Run Code Online (Sandbox Code Playgroud)
如果没有--repo pgdg12
,这对我不起作用。
仍在寻找这种行为的原因......