如何修復遺失鑰匙的錯誤?

如何修復遺失鑰匙的錯誤?

身為 Linux 新手,我真的需要你的幫助:/

trusted.gpg.d我已經刪除了位於 的資料夾/etc/apt/,也刪除了/etc/apt/sources.list.d.

現在,當我嘗試更新時,我收到以下錯誤:

Err:2 LINKpt.archive.ubuntu.com/ubuntu focal-updates InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY **<My_Key_Missingg1>** NO_PUBKEY  **<My_Key_Missingg2>**
Err:3 LINKpt.archive.ubuntu.com/ubuntu focal-backports InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY **<My_Key_Missingg1>** NO_PUBKEY  **<My_Key_Missingg2>**
Err:4 LINKpt.archive.ubuntu.com/ubuntu focal-security InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY **<My_Key_Missingg1>** NO_PUBKEY  **<My_Key_Missingg2>**
Err:5 LINKppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu focal InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY **<My_Key_Missingg3>**
Get:9 LINKmaven.xwiki.org stable/ Packages [352 kB]
Reading package lists... Done
W: GPG error: LINKpt.archive.ubuntu.com/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY **<My_Key_Missingg1>** NO_PUBKEY  **<My_Key_Missingg2>**
E: The repository 'LINKpt.archive.ubuntu.com/ubuntu focal 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: LINKpt.archive.ubuntu.com/ubuntu focal-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY **<My_Key_Missingg1>** NO_PUBKEY  **<My_Key_Missingg2>**
E: The repository 'LINKpt.archive.ubuntu.com/ubuntu focal-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: LINKpt.archive.ubuntu.com/ubuntu focal-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY **<My_Key_Missingg1>** NO_PUBKEY  **<My_Key_Missingg2>**
E: The repository 'LINKpt.archive.ubuntu.com/ubuntu focal-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: LINKpt.archive.ubuntu.com/ubuntu focal-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY **<My_Key_Missingg1>** NO_PUBKEY  **<My_Key_Missingg2>**
E: The repository 'LINKpt.archive.ubuntu.com/ubuntu focal-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: LINKppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY **<My_Key_Missingg3>**
E: The repository 'http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu focal 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.

筆記 -我已將 http:// 更改為 LINK 以便能夠提交此問題。

我嘗試過很多建議,例如:

1 -apt install extundelete恢復文件。並收到此錯誤:E: Unable to locate package extundelete

2 - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys **<MY KEY>**(我嘗試過使用和不使用 hkp://)

3 -apt-get install ubuntu-keyring以及有關 NO_PUBKEYS 的類似錯誤

4 - gpg --keyserver pgpkeys.mit.edu --recv-key **<MY KEY>** gpg -a --export **<MY KEY>** | sudo apt-key add.並得到錯誤:gpg: keyserver receive failed: End of file; gpg: WARNING: nothing exported gpg: .: read error: Is a directory gpg: no valid OpenPGP data found.

5-我也用過這個,但不成功 sudo apt update 2>&1 1>/dev/null | sed -ne 's/.*NO_PUBKEY //p' | while read key; do if ! [[ ${keys[*]} =~ "$key" ]]; then sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys "$key"; keys+=("$key"); fi; done

有人可以幫我嗎?

相關內容