Centos

無法在 CentOS Stream 9 上安裝 Certbot for Apache (python3-certbot)

  • February 9, 2022

在 Centos Stream 9 上,當我嘗試將 certbot ( sudo yum install certbot) 安裝到伺服器中時,它返回:

Error: 
Problem: package certbot-1.22.0-1.el8.noarch requires python3-certbot = 1.22.0-1.el8, but none of the providers can be installed
 - conflicting requests
 - nothing provides python3.6dist(setuptools) >= 39.0.1 needed by python3-certbot-1.22.0-1.el8.noarch
 - nothing provides python3.6dist(cryptography) >= 2.5.0 needed by python3-certbot-1.22.0-1.el8.noarch
 - nothing provides python3.6dist(configobj) >= 5.0.6 needed by python3-certbot-1.22.0-1.el8.noarch
 - nothing provides python3.6dist(distro) >= 1.0.1 needed by python3-certbot-1.22.0-1.el8.noarch
 - nothing provides /usr/bin/python3.6 needed by python3-certbot-1.22.0-1.el8.noarch
 - nothing provides python3.6dist(pytz) needed by python3-certbot-1.22.0-1.el8.noarch
 - nothing provides python(abi) = 3.6 needed by python3-certbot-1.22.0-1.el8.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

我試圖從官方網站安裝 python3-certbot 但也返回了這個錯誤。另外,我嘗試設置 PowerTools,但似乎 repo 不存在,所以我不能。有沒有辦法可以安裝 certbot?

Centos Stream 9沒有certbot。它不存在於 epel、epel-next repo 和 snapd 中。因此,您將不得不等待,直到它針對 Centos 9 發布。您在儲存庫中的軟體包是針對 Centos 8 的。它們永遠不會工作。

現在沒有 dnf 包,但有一個 snap 包。參考:

https://certbot.eff.org/instructions?ws=apache&os=centosrhel8

所有命令行是:


dnf config-manager –set-enabled crb

dnf 安裝https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

dnf 安裝https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm

dnf 列表|grep snapd

dnf 安裝 snapd

systemctl 啟用 snapd

systemctl 啟動 snapd

systemctl 狀態快照

快速安裝核心

ln -s /var/lib/snapd/snap /snap

snap install –classic certbot

ln -s /snap/bin/certbot /usr/bin/certbot

systemctl 列表計時器


引用自:https://unix.stackexchange.com/questions/687422