0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

curlで証明書エラーが出る場合の対処法

Last updated at Posted at 2024-12-17

症状 - Symptom

# dnf check-update
AlmaLinux 8 - BaseOS                                      0.0  B/s |   0  B     00:01
Errors during downloading metadata for repository 'baseos':
  - Curl error (77): Problem with the SSL CA cert (path? access rights?) for https://mirrors.almalinux.org/mirrorlist/8/baseos [error setting certificate verify locations:
  CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none]
エラー: repo 'baseos' のメタデータのダウンロードに失敗しました : Cannot prepare internal mirrorlist: Curl error (77): Problem with the SSL CA cert (path? access rights?) for https://mirrors.almalinux.org/mirrorlist/8/baseos [error setting certificate verify locations:
  CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none]
  • dnf ~~系(i.e. dnf install, dnf update)を実行するとSSL CA系(?)のエラーが表示され止まる。
  • curlコマンドも同様
  • http://はアクセスできそう。(curl http://www.google.co.jpはできた)
  • https://がダメみたい(curl https://www.google.co.jpは↑のエラーが出た)

試したこと

  1. ls -l /etc/pki/tls/certs/ca-bundle.crt とか cat /etc/pki/tls/certs/ca-bundle.crt したらファイルがなかった
    ls -l /etc/pki/tls/certs/
    合計 0
    
  2. Laravel関連の記事とか、なんか面倒そうなやつの内容見た(見ただけ)
  3. dateで設定されているサーバの時間確認(大きく時間がズレているとダメみたいなので)

対処方法

  1. /etc/yum.confの最下行(5-6行くらいしかないテキストファイル)にsslverify=false追記する
  2. sudo dnf -y reinstall ca-certificates実施したらなおった
  3. あとは/etc/yum.confに追記したsslverify=falseを消しとく

これが一番変更なくて済むのかな。( ๑╹⌓╹ )

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?