CentOS に CA 証明書を再インストールしようとしています

CentOS に CA 証明書を再インストールしようとしています

Web サービスに接続しようとすると、エラーが発生します:

cURL error 77: .........

ウェブ上で読んだところ、次の方法で修正できるとのことでした。

yum reinstall -y ca-certificates

しかし、そうすると次のようになります:

# yum reinstall -y ca-certificates
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
Could not get metalink https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=x86_64 error was
14: curl#77 - "Problem with the SSL CA cert (path? access rights?)"
Could not retrieve mirrorlist https://mirror.webtatic.com/yum/el7/x86_64/mirrorlist error was
14: curl#77 - "Problem with the SSL CA cert (path? access rights?)"

何をすればいいですか?

答え1

次のようにして、yum での SSL 検証を一時的に無効にします。

  1. echo "sslverify=0" >> /etc/yum.conf
    
  2. yum 再インストール -y ca-証明書
  3. お好みのエディタで/etc/yum.confから一時的なハックを削除します

編集:

何らかの理由でこれがまだ機能しない場合は、次の操作を試してください。

  1. パッケージを探します。RPMパッケージの場合は、次のWebサイトをお勧めします。https://pkgs.org/
  2. curl -kまたはでパッケージをダウンロードしますwget --no-check-certificate。以下のケースではhttphttpsにリダイレクトされる可能性があることに注意してください。CentOS 7および現在の日付次のようになります:wget --no-check-certificate http://mirror.centos.org/centos/7/os/x86_64/Packages/ca-certificates-2020.2.41-70.0.el7_8.noarch.rpm || curl -k http://mirror.centos.org/centos/7/os/x86_64/Packages/ca-certificates-2020.2.41-70.0.el7_8.noarch.rpm -o ca-certificates-2020.2.41-70.0.el7_8.noarch.rpm
  3. 手動でインストールするyum reinstall -y ./ca-certificates-2020.2.41-70.0.el7_8.noarch.rpm

関連情報