解决macos ld: library not found for -lcrypto

主要原因是ldflag没有设置对,导致路径找不到

brew install openssl
brew unlink openssl && brew link openssl --force
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/[email protected]/include"
export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"

之后再安装。

你可能感兴趣的:(笔记,开发,运维,python,macos,openssl)