运行命令后sudo apt-get update
我收到以下错误:
W: GPG error: https://deb.nodesource.com/node_7.x xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1655A0AB68576280
W: The repository 'https://deb.nodesource.com/node_7.x xenial InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
我怎样才能解决这个问题?
答案1
您使用的存储库存在安全证书问题。在存储库维护人员修复该问题之前,您能够完成更新的唯一方法是禁用该存储库。如果只有这两个问题,那应该不是什么大问题,而且问题应该是暂时的——每次存储库未通过安全检查时,都应该通知存储库维护人员。
答案2
您可以通过“curl -s”获取密钥http://nsolid-deb.nodesource.com/gpgkey/NODESOURCE-NSOLID-GPG-SIGNING-KEY‘
要修复该错误,您必须为正在使用的存储库导入该密钥。要为您的存储库导入密钥,请运行以下命令
curl -s http://nsolid-deb.nodesource.com/gpgkey/NODESOURCE-NSOLID-GPG-SIGNING-KEY | sudo apt-key add -