sudo apt update报错:Failed to fetch https://deb.opera.com/opera-stable/dists/stable/InRelease

问题:

 
 Get:13 https://deb.opera.com/opera-stable stable InRelease [2,590 B]                                                  
Err:13 https://deb.opera.com/opera-stable stable InRelease                                                    
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 24A1004B1F11DCC9
Get:14 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64  InRelease [1,484 B]
Hit:15 https://nvidia.github.io/nvidia-container-runtime/stable/ubuntu18.04/amd64  InRelease
Hit:16 https://apt.foxglove.dev/studio stable InRelease                   
Fetched 4,074 B in 3s (1,341 B/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://deb.opera.com/opera-stable stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 24A1004B1F11DCC9
W: Failed to fetch https://deb.opera.com/opera-stable/dists/stable/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 24A1004B1F11DCC9
W: Some index files failed to download. They have been ignored, or old ones used instead.

解决:

这个问题表明你的系统在尝试更新 Opera 软件包时遇到了 GPG 错误,因为无法验证签名,可能是由于缺少公钥。

要解决这个问题,你可以尝试导入 Opera 软件包的公钥。请使用以下命令将公钥添加到你的系统:

bash

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 24A1004B1F11DCC9


然后再次运行 sudo apt update 进行更新。

如果你还是遇到问题,可能需要考虑检查 Opera 软件包的来源,确保它是正确的。你还可以考虑更改软件源,使用官方的 Opera 软件源。

请注意,使用 apt-key 的方法在新版 Ubuntu 中已被弃用,因此推荐使用 gpg 命令来导入公钥。如果上述方法不起作用,可以尝试以下命令:

bash

gpg --keyserver keyserver.ubuntu.com --recv-keys 24A1004B1F11DCC9
gpg --export --armor 24A1004B1F11DCC9 | sudo apt-key add -

你可能感兴趣的:(ros,update,apt-get,InRelease,报错)