install gpg with homebrew I want to install a new version of ruby via rvm.
To install that, I need gnupg2. I installed it using brew, but it could not be linked.

I get the following error message when linking with brew link gpg2:

Linking /usr/local/Cellar/gnupg/2.1.20... 
Error: Could not symlink bin/gpg-agent
Target /usr/local/bin/gpg-agent
is a symlink belonging to gpg-agent. You can unlink it:
brew unlink gpg-agent

To force the link and overwrite all conflicting files:
brew link --overwrite gnupg

To list all files that would be deleted:
brew link --overwrite --dry-run gnupg


I have no idea what the gpg-agent does and if I can savely overwrite the link without destroying something that my system somewhere needs.
By default, macOS does not use anything under /usr/local, so yes you can brew link --overwrite gnupg safely.