Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gpg2 command not found even when gpg2 is installed on mac? (trying to install rvm)

Tags:

macos

rvm

gnupg

So I installed brew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

and then I installed gnupg2 and gnupg like so:

brew install gnupg gnupg2

I tried to install both again seperately like so:

brew install gpg2

brew install gnupg

and it said both are already installed. (wanted to confirm it).

Now, when I try to install RVM like so:

gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

my MAC says

-bash: gpg2: command not found

Any idea why?

like image 605
Jay Patel Avatar asked Jan 27 '19 18:01

Jay Patel


1 Answers

On Mac, installing with brew already gives you gpg2, but it's named as gpg, so you need to create an alias or a symlink. A symlink worked for me.

brew install gnupg

Get where is gpg located

which gpg

In my case it was /usr/local/bin/gpg

Then create symlink:

ln -s /usr/local/bin/gpg /usr/local/bin/gpg2
like image 171
Sergio Gonzalez Avatar answered Sep 17 '22 11:09

Sergio Gonzalez