I'm using Amazon Linux. Here's the uname info

[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

I'm having trouble importing a key I need for installing an RPM. Here's what I'm doing and the error I'm getting

[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)...,,, ...
Connecting to dl-ssl.google.com (dl-ssl.google.com)||: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]

What's the right way to import the key on my system?


It should be

sudo rpm --import linux_signing_key.pub

Mind those two dashes.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.