前提・実現したいこと
CentOS stream 9にApacheで立てたサイトをSSL化したいと思っています。
そのために、Let's Encrypt クライアントである「certbot」をインストールしようとして次のコマンドを入力しました。
yum -y install certbot python2-certbot-apache
しかし、下記のエラーが出てしまいインストールできずに困っています。
発生している問題・エラーメッセージ
# yum -y install certbot python2-certbot-apache Updating Subscription Management repositories. Unable to read consumer identity This system is not registered with an entitlement server. You can use subscription-manager to register. Last metadata expiration check: 2:27:43 ago on Sun 02 Jan 2022 10:09:44 PM JST. Error: Problem 1: conflicting requests - nothing provides python(abi) = 2.7 needed by python2-certbot-apache-1.11.0-1.el7.noarch Problem 2: package certbot-1.11.0-2.el7.noarch requires python2-certbot = 1.11.0-2.el7, but none of the providers can be installed - conflicting requests - nothing provides pytz needed by python2-certbot-1.11.0-2.el7.noarch - nothing provides /usr/bin/python2 needed by python2-certbot-1.11.0-2.el7.noarch - nothing provides python-zope-interface needed by python2-certbot-1.11.0-2.el7.noarch - nothing provides python(abi) = 2.7 needed by python2-certbot-1.11.0-2.el7.noarch - nothing provides python2-cryptography >= 1.2.3 needed by python2-certbot-1.11.0-2.el7.noarch (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
試したこと
python2系のインストールが必要なのかと思い、インストールしようとして下記のコマンドを入力したのですが、次のエラーが発生してしまいました。
sh
1# yum install python2 2Updating Subscription Management repositories. 3Unable to read consumer identity 4 5This system is not registered with an entitlement server. You can use subscription-manager to register. 6 7Last metadata expiration check: 2:55:08 ago on Sun 02 Jan 2022 10:09:44 PM JST. 8No match for argument: python2 9Error: Unable to find a match: python2 10
補足情報(FW/ツールのバージョンなど)
- CentOSのバージョン:CentOS Stream release 9
- apacheのバージョン: Apache/2.4.51 (CentOS Stream)
CentOS Stream 詳しくありませんが、yum は廃止されたと聞きましたが…。
また、python2 で書かれた古い certbot はもう動かない (Let’s Encrypt のサーバー側で拒否される) はずです。
新しい certbot は snap というパッケージマネージャーを使って入れるのが推奨されてると記憶してますが、CentOS Stream 9 に対応してるかは知りません。(もしかしたら dnf 版もあるのかも?)
環境構成に誤りありませんか?
メッセージに表示されているパッケージがel7となっており、centos7用のリポジトリがインストールされてしまっているのでは?
追記です
9用のリポジトリをインストールできた場合でもcertbotパッケージは利用できないです
→下記URLにパッケージが見当たりません
https://dl.fedoraproject.org/pub/epel/9/Everything/x86_64/Packages/c/
みなさま、ありがとうございますm(__)m
OSはCentOS Stream 9で間違いないのですが、ssl化を行う際にCentOS7用のサイトを参照していたためパッケージがel7となってしまったのだと思います。
centos9用のEPELリポジトリの追加を試みたのですが、下記のようにエラーになってしまいます。
```sh
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
CentOS Stream 9 - BaseOS 13 kB/s | 9.6 kB 00:00
CentOS Stream 9 - AppStream 41 kB/s | 9.7 kB 00:00
CentOS Stream 9 - CRB 820 kB/s | 2.9 MB 00:03
Extra Packages for Enterprise Linux 9 - x86_64 5.3 MB/s | 2.0 MB 00:00
Extra Packages for Enterprise Linux Modular 9 - x86_64 47 kB/s | 86 kB 00:01
Errors during downloading metadata for repository 'epel-modular':
- Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=epel-modular-9&arch=x86_64&infra=$infra&content=$contentdir (IP: 2406:da18:39f:a01:35a2:d9e9:8164:a209)
- Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=epel-modular-9&arch=x86_64&infra=$infra&content=$contentdir&countme=1 (IP: 2406:da18:39f:a01:35a2:d9e9:8164:a209)
- Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=epel-modular-9&arch=x86_64&infra=$infra&content=$contentdir (IP: 2406:da12:0:c10:92a3:5a6e:221b:f9eb)
Error: Failed to download metadata for repo 'epel-modular': Cannot prepare internal mirrorlist: Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=epel-modular-9&arch=x86_64&infra=$infra&content=$contentdir (IP: 2406:da12:0:c10:92a3:5a6e:221b:f9eb)
```
また、snapというパッケージマネージャーによるcertbotの導入を試みたのですが、下記のようなエラーが出てしまいます。
```sh
sudo yum install snapd
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Extra Packages for Enterprise Linux Modular 9 - x86_64 36 kB/s | 86 kB 00:02
Errors during downloading metadata for repository 'epel-modular':
- Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=epel-modular-9&arch=x86_64&infra=$infra&content=$contentdir (IP: 2406:da12:0:c10:92a3:5a6e:221b:f9eb)
- Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=epel-modular-9&arch=x86_64&infra=$infra&content=$contentdir (IP: 2406:da1a:fcb:2f01:f381:af1a:f922:c519)
- Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=epel-modular-9&arch=x86_64&infra=$infra&content=$contentdir (IP: 2406:da18:39f:a01:8c16:c226:1274:7098)
Error: Failed to download metadata for repo 'epel-modular': Cannot prepare internal mirrorlist: Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=epel-modular-9&arch=x86_64&infra=$infra&content=$contentdir (IP: 2406:da12:0:c10:92a3:5a6e:221b:f9eb)
```
`Status code: 404` ということは、centos9用のモジュールはまだ用意されていないということになるのでしょうか。
あなたの回答
tips
プレビュー