yumエラー Cannot open: https://repo.ius.io/ius-release-el7.rpm

2020年11月19日木曜日

CentOS7 Python

t f B! P L

CentOS7にpython3.6をインストールする目的でyum install -y https://centos7.iuscommunity.org/ius-release.rpmを実行すると、なぜか次のようなエラーが発生しました。

$sudo yum install -y https://repo.ius.io/ius-release-el7.rpm
Loaded plugins: fastestmirror
Cannot open: https://repo.ius.io/ius-release-el7.rpm. Skipping.
Error: Nothing to do
yumの代わりにwgetを使用すると次のようなエラーが出るので、証明書関係の問題かと思っていたら違っていました。

$wget https://repo.ius.io/ius-release-el7.rpm
--2020-10-16 07:06:01--  https://repo.ius.io/ius-release-el7.rpm
Resolving repo.ius.io (repo.ius.io)... 23.194.142.187, 2403:e800:e803:783::3898, 2403:e800:e803:799::3898
Connecting to repo.ius.io (repo.ius.io)|23.194.142.187|:443... connected.
ERROR: cannot verify repo.ius.io's certificate, issued by ‘/C=US/O=DigiCert Inc/CN=DigiCert SHA2 Secure Server CA’:
  Issued certificate not yet valid.
To connect to repo.ius.io insecurely, use `--no-check-certificate'.

原因

サーバーの時間設定がエラーの原因でした。時間が現実よりも約1ヶ月遅れていました。次のように時間を合わせることで、ius-release.rpmが問題なくインストールできました。

$date
Fri Oct 16 07:37:50 JST 2020
$sudo timedatectl set-timezone Asia/Tokyo
$sudo yum install -y chrony
$sudo systemctl start chronyd
$date
$Thu Nov 19 18:12:04 JST 2020
$
$sudo yum install -y https://repo.ius.io/ius-release-el7.rpm
Loaded plugins: fastestmirror
ius-release-el7.rpm                                      | 8.2 kB     00:00     
Examining /var/tmp/yum-root-jmKm2C/ius-release-el7.rpm: ius-release-2-1.el7.ius.noarch
Marking /var/tmp/yum-root-jmKm2C/ius-release-el7.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package ius-release.noarch 0:2-1.el7.ius will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package           Arch         Version            Repository              Size
================================================================================
Installing:
 ius-release       noarch       2-1.el7.ius        /ius-release-el7       4.5 k

Transaction Summary
================================================================================
Install  1 Package

Total size: 4.5 k
Installed size: 4.5 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : ius-release-2-1.el7.ius.noarch                               1/1 
  Verifying  : ius-release-2-1.el7.ius.noarch                               1/1 

Installed:
  ius-release.noarch 0:2-1.el7.ius                                              

Complete!

このブログを検索

QooQ