如何在这个 Centos 8 系统上安装邮政?获得"Error: Problem: cannot install the best candidate for the job"



相关问题:为什么在RHEL 8/CentOS 8上无法安装PostGIS 3 ?

系统版本:CentOS 8Postgres 12.3

这是一个生产数据库,所以我不能卸载/重新安装postgres。我在不同的服务器上做了dnf install postgis31_13,没有问题,但不明白为什么它不能在这个系统上工作。

我尝试执行dnf install postgis31_12,它返回以下错误:

[user@computer ~]# dnf install postgis31_12
Last metadata expiration check: 0:21:12 ago on Tue Oct 19 19:22:40 2021.
Error:
Problem: cannot install the best candidate for the job
- nothing provides geos39 >= 3.9.1 needed by postgis31_12-3.1.4-1.rhel8.x86_64
- nothing provides gdal33-libs >= 3.3.1 needed by postgis31_12-3.1.4-1.rhel8.x86_64
- nothing provides proj81 >= 8.1.0 needed by postgis31_12-3.1.4-1.rhel8.x86_64
- nothing provides libSFCGAL.so.1()(64bit) needed by postgis31_12-3.1.4-1.rhel8.x86_64
- nothing provides libproj.so.22()(64bit) needed by postgis31_12-3.1.4-1.rhel8.x86_64
- nothing provides SFCGAL needed by postgis31_12-3.1.4-1.rhel8.x86_64
- nothing provides libgeotiff16 needed by postgis31_12-3.1.4-1.rhel8.x86_64
- nothing provides libgdal.so.29()(64bit) needed by postgis31_12-3.1.4-1.rhel8.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

我试过dnf install postgis31_12 --nobest,它返回同样的东西,但大约三倍的行数"nothing提供…">

其他我尝试过但没有任何效果的方法:

  • 不同postgis版本
  • 重试dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
  • dnf --enablerepo=PowerTools install postgis31_12选自相关问题
  • dnf --disablerepo AppStream install postgis31_12
  • 这一系列命令来自相关问题:
dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
dnf -qy module disable postgresql
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf --enablerepo=PowerTools install postgresql12-contrib postgis30_12

在另一个工作服务器(也是Centos 8)上,我做了dnf list --installed,并注意到geos39SFCGAL存在,并且来自@pgdg-common存储库,详细信息在postgresql.org上,我相信从这里下载:https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm

我想我需要以某种方式使dnf install包括@pgdg-common存储库,但我不确定如何(或者如果它已经是)。我已经下载了…我还需要做些什么吗?是否还有其他问题,或者其他信息可以澄清情况?


edit:dnf list | grep pgdg-common不返回任何内容。显然,dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm没有让pgdg-commondnf可用,但我相信这应该是所有需要的。

最后的问题是

dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm

/etc/yum.repos.d/中创建pgdg-redhat-all.repo.rpmnew。这种情况发生在pgdg-redhat-all.repo被编辑后,并通过将pgdg-redhat-all.repo.rpmnewpgdg-common内容添加到pgdg-redhat-all.repo来解决。然后我运行dnf install postgis31_12,它成功地完成了。

在https://www.postgresql.org/about/news/announcing-common-yum-repository-2027/

中说明了该场景

相关内容

最新更新