centos7安装postgresql时遇到unable to find a match错误

按照官网步骤安装postgresql,在执行

1
yum install postgresql95

时总是提示

1
2
3
Last metadata expiration check: 0:00:20 ago on Mon 27 Apr 2020 08:32:11 AM CST.
No match for argument: postgresql95
Error: Unable to find a match

https://www.reddit.com/r/PostgreSQL/comments/ecg8zm/difficulty_installing_pg12_on_centos_8/找到了解答。先执行

1
sudo dnf -y module disable postgresql

之后就可以正常安装了。