Fixing 'ld: warning: directory not found for option'

While I was trying to install Ruby via ruby-install on my MacBook Air, I kept getting the following error message:

ld: warning: directory not found for option '-L/usr/local/Cellar/openssl/1.0.2k/lib'  
ld: warning: directory not found for option '-L/usr/local/Cellar/readline/7.0.1/lib'  

The solution was to re-install problematic packages with Homebrew.

$ brew uninstall --ignore-dependencies --force openssl
$ brew install openssl

$ brew uninstall --ignore-dependencies --force readline
$ brew install readline

Like this post? Follow @shimewastaken on Twitter for more content like this.