记录: 解决 pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)
- Mac 不知道怎么操作的 rm 了 usr/local/ 里面的某些文件, 导致一直出现 pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other), 卸载从新安装, 重新配环境变量, 重新编译 都无法解决 甚是心累;
- 解决方法:
- 0. pip uninstall pycurl
- 1. brew install openssl
- 2. echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
ps: 这步出现了 Permission denied 你敢信 我可是 sudo 啊, 如果出现了这种情况, 直接用 vim 将 export PATH="/usr/local/opt/openssl/bin:$PATH" 写到 ~/.bash_profile 文件里;
- 3. export LDFLAGS="-L/usr/local/opt/openssl/lib"
- 4. export CPPFLAGS="-I/usr/local/opt/openssl/include"
- 5. export PYCURL_SSL_LIBRARY=openssl
- 6. pip install pycurl --compile --no-cache-dir
- 记一下, 下次再出现照抄