如何在此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"
问题描述
相关问题: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
,注意到geos39
和SFCGAL
存在于@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-common
对dnf
可用,但我认为这就是应该需要的全部内容。
推荐答案
问题最终是
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屋!