我正在尝试手动添加密钥,但由于某种原因我无法添加密钥。
我怎样才能在不使用的情况下手动添加密钥add-apt-key
hutber@hutber-PC:~$ sudo apt-get install software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
software-properties-common is already the newest version (0.96.20.2-1).
The following package was automatically installed and is no longer required:
libnpth0:i386
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 60 not upgraded.
hutber@hutber-PC:~$ sudo add-apt-key 073E051D7B2AEE37
sudo: add-apt-key: command not found
答案1
它是apt-key add
-apt-key
命令和add
子命令/选项(您可能会将其与 混淆add-apt-repository
)。这是用于从文件添加密钥。如果您想获取密钥并添加它,您需要apt-key adv --recv-key
:
adv
Pass advanced options to gpg. With adv --recv-key you can e.g.
download key from keyservers directly into the the trusted set of
keys. Note that there are no checks performed, so it is easy to
completely undermine the apt-secure(8) infrastructure if used
without care.