我正在使用亚马逊Linux。这是 uname 信息
[myuser@mymachine3 ~]$ uname -a
Linux mymachine3 4.8.18-12.31.amzn1.x86_64 #1 SMP Thu Jun 22 06:20:54 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
我在导入安装 RPM 所需的密钥时遇到问题。这是我正在做的事情以及我遇到的错误
[myuser@mymachine3 ~]$ wget https://dl-ssl.google.com/linux/linux_signing_key.pub
--2017-08-25 14:38:31-- https://dl-ssl.google.com/linux/linux_signing_key.pub
Resolving dl-ssl.google.com (dl-ssl.google.com)... 173.194.206.93, 173.194.206.136, 173.194.206.190, ...
Connecting to dl-ssl.google.com (dl-ssl.google.com)|173.194.206.93|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8038 (7.8K) [application/octet-stream]
Saving to: ‘linux_signing_key.pub’
linux_signing_key.pub 100%[================================================================================================================>] 7.85K --.-KB/s in 0s
2017-08-25 14:38:31 (71.2 MB/s) - ‘linux_signing_key.pub’ saved [8038/8038]
[myuser@mymachine3 ~]$ sudo rpm –import linux_signing_key.pub
[sudo] password for myuser:
RPM version 4.11.3
Copyright (C) 1998-2002 - Red Hat, Inc.
This program may be freely redistributed under the terms of the GNU GPL
Usage: rpm [-aKfgpqVcdLilsiv?] [-a|--all] [-f|--file] [-g|--group] [-p|--package] [--pkgid] [--hdrid] [--triggeredby] [--whatrequires] [--whatprovides] [--nomanifest] [-c|--configfiles]
[-d|--docfiles] [-L|--licensefiles] [--dump] [-l|--list] [--queryformat=QUERYFORMAT] [-s|--state] [--nofiledigest] [--nofiles] [--nodeps] [--noscript] [--allfiles] [--allmatches]
[--badreloc] [-e|--erase <package>+] [--excludedocs] [--excludepath=<path>] [--force] [-F|--freshen <packagefile>+] [-h|--hash] [--ignorearch] [--ignoreos] [--ignoresize] [-i|--install]
[--justdb] [--nodeps] [--nofiledigest] [--nocontexts] [--noorder] [--noscripts] [--notriggers] [--nocollections] [--oldpackage] [--percent] [--prefix=<dir>] [--relocate=<old>=<new>]
[--replacefiles] [--replacepkgs] [--test] [-U|--upgrade <packagefile>+] [-D|--define 'MACRO EXPR'] [--undefine=MACRO] [-E|--eval 'EXPR'] [--macros=<FILE:...>] [--noplugins] [--nodigest]
[--nosignature] [--rcfile=<FILE:...>] [-r|--root ROOT] [--dbpath=DIRECTORY] [--querytags] [--showrc] [--quiet] [-v|--verbose] [--version] [-?|--help] [--usage] [--scripts] [--setperms]
[--setugids] [--conflicts] [--obsoletes] [--provides] [--requires] [--info] [--changelog] [--xml] [--triggers] [--last] [--dupes] [--filesbypkg] [--fileclass] [--filecolor]
[--fscontext] [--fileprovide] [--filerequire] [--filecaps]
在我的系统上导入密钥的正确方法是什么?
答案1
它应该是
sudo rpm --import linux_signing_key.pub
注意那两个破折号。