How to resolve “gpg: command not found” error duri

2020-05-11 03:45发布

I have a new mac pro (OS X 10.9.5) that I get to set up from scratch. I want to install RVM and the first thing it says to do is:

Install mpapis public key (might need gpg2 and or sudo)

gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3

When I tried I got:

gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
zsh: command not found: gpg

I've tried to find a good guide on how to overcome this that also looks trustworthy but I've had no luck.

Can someone explain what gpg is, why I dont already have it, and how do I get it the right way.

4条回答
够拽才男人
2楼-- · 2020-05-11 04:06

As the instruction said "might need gpg2"

In mac, you can try install it with homebrew

$ brew install gpg2 
查看更多
干净又极端
3楼-- · 2020-05-11 04:12

This worked for me

$brew install gnupg
查看更多
倾城 Initia
4楼-- · 2020-05-11 04:12

You can also use:

$ sudo gem install rvm

It should give you the following output:

Fetching: rvm-1.11.3.9.gem (100%)
Successfully installed rvm-1.11.3.9
Parsing documentation for rvm-1.11.3.9
Installing ri documentation for rvm-1.11.3.9
1 gem installed
查看更多
ら.Afraid
5楼-- · 2020-05-11 04:14

GnuPG (with binary name gpg) is an application used for public key encryption using the OpenPGP protocol, but also verification of signatures (cryptographic signatures, that also can validate the publisher if used correctly). To some extend, you could say it's for OpenPGP what OpenSSL is for X.509 and TLS.

Unlike most Linux distributions (which make heavy use of GnuPG for ensuring untampered software within their package repositories), Mac OS X does not bring GnuPG with the operating system, so you have to install it on your own.

Possible sources are:

  • Package manager Homebrew: brew install gnupg gnupg2
  • Package manager MacPorts: sudo port install gnupg gnupg2
  • Install from GPGTools, which also brings GUI applications and integration in Apple Mail
查看更多
登录 后发表回答