CentOS 8.0 基于最小包安装,此后需要安装PostgreSQL12。
1. 安装源
dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
2. 安装postgresql12
此时报错找不到包。
参考网上的经验,尝试命令:
dnf --repo pgdg12 install postgresql12-server.x86_64
结果报下面的错误:
```
Problem: cannot install the best candidate for the job
- nothing provides libicui18n.so.60()(64bit) needed by postgresql12-server-12.0-1PGDG.rhel8.x86_64
- nothing provides libicuuc.so.60()(64bit) needed by postgresql12-server-12.0-1PGDG.rhel8.x86_64
```
此时需要安装libicu,然后又报错找不到 python2-libs,继续安装python2-libs。
此后就可以正常安装PostgreSQL12了。