Note: I\'m not so good at using shell.
I was trying to install Valgrind using brew on Yosemite.
Valgrind
brew
brew install --HEAD valgrind<
brew install cocoapods --build-from-source brew link --overwrite cocoapods
The only commands that worked for me on after upgrading to MAC OS Mojave 10.14.6