ikmnjrd.github.io

pacmanミラーリストの更新

Posted on 2024-07-23
関連ソフトウェア バージョン
EndevaourOS Build=2024.01.25

結論

curl -s "https://archlinux.org/mirrorlist/?country=JP&country=AU&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 - | sudo tee /etc/pacman.d/mirrorlist

経緯とシューティングタイムライン

$ sudo pacman -Syuをするとエラー

エラー: ファイル 'core.db' を mirror.nishi.network から取得するのに失敗しました : Failed to connect to mirror.nishi.network port 443 after 7150 ms: Couldn't connect to server
エラー: ファイル 'extra.db' を mirror.nishi.network から取得するのに失敗しました : Failed to connect to mirror.nishi.network port 443 after 7150 ms: Couldn't connect to server
エラー: ファイル 'multilib.db' を mirror.nishi.network から取得するのに失敗しました : Failed to connect to mirror.nishi.network port 443 after 7150 ms: Couldn't connect to server
警告: mirror.nishi.network からのエラーが多すぎるため、残りの処理ではスキップします

/etc/pacman.d/mirrorlistはこうなってた

################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################

# With:       reflector --verbose -c JP --protocol https --sort rate --latest 20 --download-timeout 5 --threads 5
# When:       2024-04-02 14:59:21 UTC
# From:       https://archlinux.org/mirrors/status/json/
# Retrieved:  2024-04-02 14:57:27 UTC
# Last Check: 2024-04-02 14:53:55 UTC

Server = https://mirror.nishi.network/archlinux/$repo/os/$arch
Server = https://mirrors.cat.net/archlinux/$repo/os/$arch

ArchWikiにも色々書いてあるが、とりあえずChatGPTにコマンド組んでもらったのが以下

curl -s "https://archlinux.org/mirrorlist/?country=JP&country=AU&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 - | sudo tee /etc/pacman.d/mirrorlist

実行後に生成したファイルの中身は以下

Server = https://repo.jing.rocks/archlinux/$repo/os/$arch
Server = https://jp.mirrors.cicku.me/archlinux/$repo/os/$arch
Server = https://mirrors.cat.net/archlinux/$repo/os/$arch
Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch
Server = https://www.miraa.jp/archlinux/$repo/os/$arch

参考文献