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 orsudo
)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.
This question is related to
ruby
macos
command-line
rvm
gnupg
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
As the instruction said "might need gpg2"
In mac, you can try install it with homebrew
$ brew install gpg2
This worked for me
$brew install gnupg
On my clean macOS 10.15.7, I needed to brew link gnupg && brew unlink gnupg
first and then used Ashish's answer to use gpg
instead of gpg2
. I also had to chown
a few directories. before the un/link.
On Mac OSX 10.15, Even after installing gpg, i was getting gpg2 command not found
$ brew install gnupg gnupg2
Warning: gnupg 2.2.23 is already installed and up-to-date
To reinstall 2.2.23, run `brew reinstall gnupg`
$ gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
-bash: gpg2: command not found
Instead, this worked for me
$ gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
Source: Stackoverflow.com