One - One Code All

Blog Content

rust 执行cargo run报openssl错误

Rust   2021-11-30 01:10:18

报错内容:rust src/openssl_shim.c:1:10: fatal error: 'openssl/hmac.h' file not found


failed to run custom build command for `openssl-sys-extras v0.7.4`


解决:

export OPENSSL_INCLUDE_DIR=/usr/local/Cellar/openssl/1.0.2s/include \

export  OPENSSL_LIB_DIR=/usr/local/Cellar/openssl/1.0.2s/lib \

cargo clean

cargo build


参考:https://stackoverflow.com/questions/34612395/openssl-crate-fails-compilation-on-mac-os-x-10-11



上一篇:mysql8 内存优化
下一篇:rust使用mysql

The minute you think of giving up, think of the reason why you held on so long.