APT 在添加存储库时抱怨签名和安全性不佳,无法安装软件包

APT 在添加存储库时抱怨签名和安全性不佳,无法安装软件包

在我的终端运行命令后sudo apt-get update出现一些错误:

Hit:1 https://dl.yarnpkg.com/debian stable InRelease
Hit:2 http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu artful InRelease
Get:3 http://id.archive.ubuntu.com/ubuntu artful InRelease [237 kB]      
Get:4 http://security.ubuntu.com/ubuntu artful-security InRelease [78,6 kB]
Err:3 http://id.archive.ubuntu.com/ubuntu artful InRelease                     
  The following signatures were invalid: BADSIG 3B4FE6ACC0B21F32 Ubuntu Archive Automatic Signing Key (2012) <[email protected]>
Hit:5 http://id.archive.ubuntu.com/ubuntu artful-updates InRelease
Get:6 http://id.archive.ubuntu.com/ubuntu artful-backports InRelease [72,2 kB]
Reading package lists... Done      
W: GPG error: http://id.archive.ubuntu.com/ubuntu artful InRelease: The following signatures were invalid: BADSIG 3B4FE6ACC0B21F32 Ubuntu Archive Automatic Signing Key (2012) <[email protected]>
E: The repository 'http://id.archive.ubuntu.com/ubuntu artful 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.

如果我忽略它并尝试

sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs yarn

我收到更多错误,并且软件包未安装

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package sqlite3 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package zlib1g-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package build-essential is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package nodejs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package python-software-properties is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  software-properties-common

E: Unable to locate package git-core
E: Package 'zlib1g-dev' has no installation candidate
E: Package 'build-essential' has no installation candidate
E: Unable to locate package libreadline-dev
E: Unable to locate package libyaml-dev
E: Unable to locate package libsqlite3-dev
E: Package 'sqlite3' has no installation candidate
E: Unable to locate package libxslt1-dev
E: Package 'python-software-properties' has no installation candidate
E: Unable to locate package libffi-dev
E: Package 'nodejs' has no installation candidate

答案1

系统提示有未签名的存储库”http://id.archive.ubuntu.com/ubuntu巧”。

尝试这个命令:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32

它一定能解决你的问题。

相关内容