如何在此CentOS 8系统上安装postgis?获取&Quot;错误:问题:无法安装作业&Quot;的最佳候选人 [英] How to install postgis on this Centos 8 system? Getting "Error: Problem: cannot install the best candidate for the job"

查看:17
本文介绍了如何在此CentOS 8系统上安装postgis?获取&Quot;错误:问题:无法安装作业&Quot;的最佳候选人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

相关问题:Why is installing PostGIS 3 on RHEL 8 / CentOS 8 impossible?

系统版本: CentOS,8 波斯格雷斯,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存储库中,here on postgresql.org我相信是从此处下载的:https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm

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


编辑: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-common内容从pgdg-redhat-all.repo.rpmnew添加到pgdg-redhat-all.repo而被解决时,就会发生这种情况。然后我运行dnf install postgis31_12,它成功完成。

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

中说明

这篇关于如何在此CentOS 8系统上安装postgis?获取&Quot;错误:问题:无法安装作业&Quot;的最佳候选人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆