症状
$ flatpak --user --no-gpg-verify remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
error: Can't load uri https://dl.flathub.org/repo/flathub.flatpakrepo: While fetching https://dl.flathub.org/repo/flathub.flatpakrepo: [60] SSL peer certificate or SSH remote key was not OK
このようにエラーが発生する
原因
- PCの時刻が合っていない
解決方法
sudo apt update
sudo apt install ntpdate
sudo ntpdate pool.ntp.org
出力
ヒット:1 https://packages.microsoft.com/repos/code stable InRelease
ヒット:2 https://dl.google.com/linux/chrome/deb stable InRelease
ヒット:3 https://download.docker.com/linux/ubuntu noble InRelease
0% [brave-browser-apt-release.s3.brave.com へ接続しています] [ppa.launchpadcontent.net へ接続しています] [deb.playonlinux.com (51.254.71.191) へ接続�0% [Connected to bravヒット:4 http://archive.ubuntu.com/ubuntu noble InRelease
ヒット:5 https://brave-browser-apt-release.s3.brave.com stable InRelease
0% [ppa.launchpadcontent.net へ接続しています] [deb.playonlinux.com (51.254.71.191) へ接続しています] [repository.spotify.com (108.138.101.34) へ接続�0% [ppa.launchpadcon無視:6 https://releases.warp.dev/linux/deb stable InRelease
ヒット:7 http://archive.ubuntu.com/ubuntu noble-updates InRelease
ヒット:8 http://deb.playonlinux.com cosmic InRelease
ヒット:9 https://releases.warp.dev/linux/deb stable Release
ヒット:10 http://security.ubuntu.com/ubuntu noble-security InRelease
ヒット:11 http://repository.spotify.com stable InRelease
ヒット:12 http://archive.ubuntu.com/ubuntu noble-backports InRelease
ヒット:14 https://ppa.launchpadcontent.net/flatpak/stable/ubuntu noble InRelease
パッケージリストを読み込んでいます... 完了
N: リポジトリ 'https://brave-browser-apt-release.s3.brave.com stable InRelease' がアーキテクチャ 'i386' をサポートしないため設定ファイル 'main/binary-i386/Packages' の取得をスキップ
W: http://deb.playonlinux.com/dists/cosmic/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています... 完了
状態情報を読み取っています... 完了
以下の追加パッケージがインストールされます:
ntpsec-ntpdate ntpsec-ntpdig python3-ntp
以下のパッケージが新たにインストールされます:
ntpdate ntpsec-ntpdate ntpsec-ntpdig python3-ntp
アップグレード: 0 個、新規インストール: 4 個、削除: 0 個、保留: 13 個。
156 kB のアーカイブを取得する必要があります。
この操作後に追加で 607 kB のディスク容量が消費されます。
続行しますか? [Y/n]
取得:1 http://archive.ubuntu.com/ubuntu noble/universe amd64 python3-ntp amd64 1.2.2+dfsg1-4build2 [91.2 kB]
取得:2 http://archive.ubuntu.com/ubuntu noble/universe amd64 ntpsec-ntpdig amd64 1.2.2+dfsg1-4build2 [25.2 kB]
取得:3 http://archive.ubuntu.com/ubuntu noble/universe amd64 ntpsec-ntpdate amd64 1.2.2+dfsg1-4build2 [22.3 kB]
取得:4 http://archive.ubuntu.com/ubuntu noble/universe amd64 ntpdate all 1:4.2.8p15+dfsg-2~1.2.2+dfsg1-4build2 [17.5 kB]
156 kB を 2秒 で取得しました (80.7 kB/s)
以前に未選択のパッケージ python3-ntp を選択しています。
(データベースを読み込んでいます ... 現在 202322 個のファイルとディレクトリがインストールされています。)
.../python3-ntp_1.2.2+dfsg1-4build2_amd64.deb を展開する準備をしています ...
python3-ntp (1.2.2+dfsg1-4build2) を展開しています...
以前に未選択のパッケージ ntpsec-ntpdig を選択しています。
.../ntpsec-ntpdig_1.2.2+dfsg1-4build2_amd64.deb を展開する準備をしています ...
ntpsec-ntpdig (1.2.2+dfsg1-4build2) を展開しています...
以前に未選択のパッケージ ntpsec-ntpdate を選択しています。
.../ntpsec-ntpdate_1.2.2+dfsg1-4build2_amd64.deb を展開する準備をしています ...
ntpsec-ntpdate (1.2.2+dfsg1-4build2) を展開しています...
以前に未選択のパッケージ ntpdate を選択しています。
.../ntpdate_1%3a4.2.8p15+dfsg-2~1.2.2+dfsg1-4build2_all.deb を展開する準備をしています ...
ntpdate (1:4.2.8p15+dfsg-2~1.2.2+dfsg1-4build2) を展開しています...
python3-ntp (1.2.2+dfsg1-4build2) を設定しています ...
ntpsec-ntpdig (1.2.2+dfsg1-4build2) を設定しています ...
ntpsec-ntpdate (1.2.2+dfsg1-4build2) を設定しています ...
ntpdate (1:4.2.8p15+dfsg-2~1.2.2+dfsg1-4build2) を設定しています ...
man-db (2.12.0-4build2) のトリガを処理しています ...
2024-08-10 09:01:10.581577 (+0900) -86389.789815 +/- 0.016055 pool.ntp.org 133.243.238.163 s1 no-leap
CLOCK: time stepped by -86389.789815
これで実行できます。お疲れ様でした。