2019-02-08T14:41:52Z||2019-02-08T06:43:46Z


完整的错误信息:

cc -bundle -undefined dynamic_lookup -Wl,-F. build/temp.macosx-10.14-intel-2.7/_mysql.o -L/usr/local/Cellar/mysql@5.7/5.7.24/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.14-intel-2.7/_mysql.so
    ld: library not found for -lssl
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command 'cc' failed with exit status 1

日,试了下重新link mysql-connector-c,然后就出现更多的离奇错误,最后又重新link回mysql@5.7, brew link --overwrite mysql@5.7 --force,然后用了这个方法:

# https://medium.com/@MrWeeble/homebrew-on-mac-and-pythons-mysqlclient-ea44fa300e70
env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" pip install mysqlclient==1.3.12

艾玛,碉堡了,直接安装成功了。看到屏幕上显示:Successfully installed mysqlclient-1.3.12
,再回想着5天没日没夜一行代码没写就是在卡在安装这些狗屁package,我留下了感动的泪水。