direnv を使っていて下記のように、ライブラリのパスがoverwriteされている場合がある。
direnv: loading .envrc
direnv: export -DYLD_LIBRARY_PATH -LD_LIBRARY_PATH
エラー内容
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
とりあえず環境変数に入れて対応。
$ LDFLAGS=-L/usr/local/opt/openssl/lib pip install mysqlclient