[macOS] macOS Big Sur ld: library not found for -lzstd


when installing mysqlclient for python

pip3 install mysqlclient

i got these errors

lib -lmysqlclient -lzstd -lresolv -o build/lib.macosx-11-x86_64-3.7/MySQLdb/_mysql.cpython-37m-darwin.so
    ld: library not found for -lzstd
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command 'clang' failed with exit status 1

Solution

brew reinstall zstd

CFLAGS="-I$(brew --prefix)/include" LDFLAGS="-L$(brew --prefix)/lib" pip3 install mysqlclient

 

Have fun with python!

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM