環境: macOS High Sierra
rails環境でbundleインストールを実行したところこんなエラーが出た
linking shared-object mysql2/mysql2.bundle
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mysql2.bundle] Error 1
xcode-select --install
を実行すると通るようになった。
再起動はしなくてもいけたが、できなければ再起動も試してみるといいかも。
参考