Обновление apt не удается после обновления до 18.04
После обновления с 16.04 до 18.04 я получаю ошибки при запуске apt-update. Вот вывод:
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Err:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Unknown error executing apt-key
Err:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Unknown error executing apt-key
Err:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Unknown error executing apt-key
Err:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Unknown error executing apt-key
Err:7 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Unknown error executing apt-key
Reading package lists... Done
W: GPG error: http://security.ubuntu.com/ubuntu bionic-security InRelease: Unknown error executing apt-key
E: The repository 'http://security.ubuntu.com/ubuntu bionic-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.ubuntu.com/ubuntu bionic InRelease: Unknown error executing apt-key
E: The repository 'http://archive.ubuntu.com/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.ubuntu.com/ubuntu bionic-updates InRelease: Unknown error executing apt-key
E: The repository 'http://archive.ubuntu.com/ubuntu bionic-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.ubuntu.com/ubuntu bionic-backports InRelease: Unknown error executing apt-key
E: The repository 'http://archive.ubuntu.com/ubuntu bionic-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.ubuntu.com/ubuntu bionic-security InRelease: Unknown error executing apt-key
E: The repository 'http://archive.ubuntu.com/ubuntu bionic-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Я посмотрел везде и попробовал все, но я не могу это исправить. Например, я пробовал переключать зеркала и перемещать файл rust.gpg, ничего не получалось.
1 ответ
У меня была точно такая же проблема после обновления до 18.04.1 Bionic. Также заставил настройки, VLC и источники не работать для меня.
Проблема заключалась в том, что библиотеки gpg указывали на библиотеки в /usr/local/lib, а не по умолчанию. Вероятно, из какой-то старой установки.
Решением для меня было переместить все библиотеки, связанные с GPG, в /usr/local/lib в другое место и заново сделать ссылки.
Вы можете проверить свои связи с библиотекой gpg, выполнив:
sudo ldd /usr/bin/gpg
Исправление повлекло за собой выдачу следующих команд на моем компьютере:
cd /usr/local/lib
sudo mkdir bkp
sudo mv libgcrypt* bkp
sudo mv libassuan* bkp
sudo mv libgpg* bkp
sudo ldconfig /usr/bin/gpg
Это исправило все мои проблемы.
Возможно, будет слишком поздно для оригинального постера, но я решил опубликовать это решение на тот случай, если кто-нибудь еще столкнется с проблемой.