MSYS2 pacman의 키 갱신하기
MSYS2의 패키지들을 업데이트하기 위해서 pacman -Syu
를 실행하니까 다음과 같은 오류가 났다.
$ pacman -Syu error: mingw32: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown error: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" could not be looked up remotely error: mingw64: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown error: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" could not be looked up remotely error: msys: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown error: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" could not be looked up remotely :: Synchronizing package databases... mingw32 870.9 KiB 433K/s 00:02 [#####################] 100% mingw32.sig 438.0 B 0.00B/s 00:00 [#####################] 100% error: mingw32: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown error: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" could not be looked up remotely error: failed to update mingw32 (invalid or corrupted database (PGP signature)) mingw64 874.5 KiB 459K/s 00:02 [#####################] 100% mingw64.sig 438.0 B 0.00B/s 00:00 [#####################] 100% error: mingw64: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown error: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" could not be looked up remotely error: failed to update mingw64 (invalid or corrupted database (PGP signature)) msys 295.4 KiB 276K/s 00:01 [#####################] 100% msys.sig 438.0 B 0.00B/s 00:00 [#####################] 100% error: msys: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown error: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" could not be looked up remotely error: failed to update msys (invalid or corrupted database (PGP signature)) error: failed to synchronize all databases
검색을 해 보니까 패키저가 바뀌면서 키도 같이 바뀌었다. 다음과 같이 해결했다.
curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
pacman-key --verify msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
pacman -U --config <(echo) msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
pacman -Syu
이제는 다음과 같은 오류가 났다.
$ pacman -Syu :: Synchronizing package databases... mingw32 is up to date mingw64 is up to date msys is up to date :: Starting core system upgrade... warning: terminate other MSYS2 programs before proceeding resolving dependencies... looking for conflicting packages... Packages (8) bash-5.1.004-1 filesystem-2021.01-1 libzstd-1.4.8-1 mintty-1~3.4.4-1 msys2-runtime-3.1.7-4 pacman-5.2.2-9 pacman-mirrors-20201208-1 zstd-1.4.8-1 Total Download Size: 11.65 MiB Total Installed Size: 57.86 MiB Net Upgrade Size: -11.87 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... bash-5.1.004-1-x86_64 2.3 MiB 281K/s 00:08 [#####################] 100% filesystem-2021.01-... 33.2 KiB 10.8M/s 00:00 [#####################] 100% mintty-1~3.4.4-1-x86_64 767.2 KiB 930K/s 00:01 [#####################] 100% msys2-runtime-3.1.7... 2.6 MiB 1155K/s 00:02 [#####################] 100% pacman-mirrors-2020... 3.8 KiB 0.00B/s 00:00 [#####################] 100% libzstd-1.4.8-1-x86_64 276.1 KiB 776K/s 00:00 [#####################] 100% zstd-1.4.8-1-x86_64 332.2 KiB 936K/s 00:00 [#####################] 100% pacman-5.2.2-9-x86_64 5.4 MiB 2.27M/s 00:02 [#####################] 100% (8/8) checking keys in keyring [#####################] 100% (8/8) checking package integrity [#####################] 100% (8/8) loading package files [#####################] 100% error: could not open file /var/cache/pacman/pkg/bash-5.1.004-1-x86_64.pkg.tar.zst: Child process exited with status 127 error: could not open file /var/cache/pacman/pkg/filesystem-2021.01-1-x86_64.pkg.tar.zst: Child process exited with status 127 error: could not open file /var/cache/pacman/pkg/mintty-1~3.4.4-1-x86_64.pkg.tar.zst: Child process exited with status 127 error: could not open file /var/cache/pacman/pkg/libzstd-1.4.8-1-x86_64.pkg.tar.zst: Child process exited with status 127 error: could not open file /var/cache/pacman/pkg/zstd-1.4.8-1-x86_64.pkg.tar.zst: Child process exited with status 127 error: could not open file /var/cache/pacman/pkg/pacman-5.2.2-9-x86_64.pkg.tar.zst: Child process exited with status 127 error: failed to commit transaction (cannot open package file) Errors occurred, no packages were upgraded.
또 검색을 해 보니 pacman 패키지의 압축 포맷을 xz에서 zstd로 바꿨다. 그런데 zstd 패키지를 설치하려면 zstd가 필요하다는 딜레마에 빠졌다. 그래서 여기에서 xz 포맷으로 된 zstd와 libzstd 패키지를 받아서 설치했다.
curl -O https://repo.msys2.org/msys/x86_64/libzstd-1.4.4-2-x86_64.pkg.tar.xz
curl -O https://repo.msys2.org/msys/x86_64/zstd-1.4.4-2-x86_64.pkg.tar.xz
pacman -U libzstd-1.4.4-2-x86_64.pkg.tar.xz
pacman -U zstd-1.4.4-2-x86_64.pkg.tar.xz
이제 pacman -Syu
를 실행하니 또 다른 오류가 났고 MSYS2 창을 닫은 다음 다시 시작하니 돌아오지 않았다. 이건 뭐 일회용 설치란 말인가? 황당하네. 그냥 새로 설치하자.