Содержание
Проблема
Во время попытки очередной раз обновиться – возникает ошибка ключей:
$ sudo pacman -Syu ... Packages (60) archlinux-keyring-20180108-1 argon2-20171227-3 bind-tools-9.11.2-3 binutils-2.29.1-2 boost-libs-1.66.0-1 chromium-63.0.3239.132-2 cmake-3.10.1-2 cryptsetup-2.0.0-5 e2fsprogs-1.43.8-1 firefox-57.0.4-1 gcc-7.2.1+20171224-2 gcc-libs-7.2.1+20171224-2 geoip-database-20180102-1 glibc-2.26-10 gwenview-17.12.0-2 imagemagick-7.0.7.21-1 intel-tbb-2018_20171205-1 jansson-2.10-3 json-c-0.13-1 kuiserver-5.11.5-1 lib32-acl-2.2.52-3 lib32-gcc-libs-7.2.1+20171224-2 lib32-glibc-2.26-10 lib32-libjpeg-turbo-1.5.3-1 libabw-0.1.2-1 libatomic_ops-7.6.2-1 libcmis-0.5.1-8 libe-book-0.1.3-1 libfilezilla-0.11.2-1 libixion-0.12.2-4 libmagick-7.0.7.21-1 libmagick6-6.9.9.33-1 libmspub-0.1.3-1 libnghttp2-1.29.0-1 liborcus-0.12.1-4 librsvg-2:2.41.2-1 linux-4.14.12-1 linux-api-headers-4.14.8-1 linux-headers-4.14.12-1 nano-2.9.2-1 openssh-7.6p1-2 opera-50.0.2762.45-1 protobuf-3.5.1.1-1 python-setuptools-1:38.4.0-1 python2-setuptools-1:38.4.0-1 qt5-base-5.10.0-2 re2-20180101-1 ruby-2.5.0-1 ruby2.4-2.4.3-1 vagrant-2.0.1-3 vim-8.0.1415-2 vim-runtime-8.0.1415-2 whois-5.2.20-1 wine-3.0rc5-1 wxgtk-common-3.0.3.1-10 wxgtk3-3.0.3.1-10 xfsprogs-4.14.0-1 xterm-331-1 youtube-dl-2018.01.07-1 zstd-1.3.3-1 Total Installed Size: 1729.89 MiB Net Upgrade Size: 24.27 MiB :: Proceed with installation? [Y/n] (60/60) checking keys in keyring [########################################################################################] 100% downloading required keys... error: key "CEB167EFB5722BD6" could not be looked up remotely error: required key missing from keyring error: failed to commit transaction (unexpected error) Errors occurred, no packages were upgraded.
Пробуем обновить ключи с помощью pacman-key
:
[simterm]
$ sudo pacman-key --lsign-key CEB167EFB5722BD6 -> Locally signing key CEB167EFB5722BD6... ==> ERROR: CEB167EFB5722BD6 could not be locally signed.
[/simterm]
Логично.
Пробуем получить ключ с сервера sks-keyservers.net:
[simterm]
$ sudo pacman-key --refresh-keys gpg: refreshing 99 keys from hkp://pool.sks-keyservers.net gpg: keyserver refresh failed: No keyserver available ==> ERROR: A specified local key could not be updated from a keyserver.
[/simterm]
Гуглим, находим описание бага тут>>>.
Решение
Чистим кеш:
[simterm]
$ sudo pacman -Scc Cache directory: /var/cache/pacman/pkg/ :: Do you want to remove ALL files from cache? [y/N] y removing all files from cache... Database directory: /var/lib/pacman/ :: Do you want to remove unused repositories? [Y/n] y removing unused sync repositories...
[/simterm]
Обновляем базу пакетов:
-S
: Sync packages-yy
: refresh package database, force refresh even if local database appears up-to-date
Запускаем:
[simterm]
$ sudo pacman -Syy :: Synchronizing package databases... core 126.8 KiB 593K/s 00:00 [#####] 100% extra 1627.9 KiB 726K/s 00:02 [#####] 100% community 4.0 MiB 1544K/s 00:03 [#####] 100% multilib 166.7 KiB 179K/s 00:01 [#####] 100% archlinuxfr 12.1 KiB 301K/s 00:00 [#####] 100%
[/simterm]
Устанавливаем последний archlinux-keyring
:
[simterm]
$ sudo pacman -S archlinux-keyring
[/simterm]
Инициализируем (обновляем на самом деле) базу:
[simterm]
$ sudo pacman-key --init
[/simterm]
Получаем ключи по умолчанию из файла /usr/share/pacman/keyrings
:
[simterm]
$ sudo pacman-key --populate archlinux ==> Appending keys from archlinux.gpg... ==> Locally signing trusted keys in keyring... -> Locally signing key DDB867B92AA789C165EEFA799B729B06A680C281... -> Locally signing key 684148BB25B49E986A4944C55184252D824B18E8... -> Locally signing key 91FFE0700E80619CEB73235CA88E23E377514E00... -> Locally signing key AB19265E5D7D20687D303246BA1DFB64FFF979E7... -> Locally signing key 0E8B644079F599DFC1DDC3973348882F6AC6A4C2... ==> Importing owner trust values... ==> Disabling revoked keys in keyring... -> Disabling key 7FA647CD89891DEDC060287BB9113D1ED21E1A55... ... -> Disabling key 27FFC4769E19F096D41D9265A04F9397CDFD6BB0... ==> Updating trust database... gpg: next trustdb check due at 2018-06-25
[/simterm]
И запускаем апдейт повторно:
[simterm]
$ sudo pacman -Syu
[/simterm]
Готово.