Rust 构建时报错: error: failed to run custom build command for openssl-sys v0.9.105
使用 zigbuild 构建时报错:
| warning: openssl-sys@0.9.105: Could not find directory of OpenSSL installation, and this `-sys` crate cannot proceed without this knowledge. If OpenSSL is installed and this crate had trouble finding it, you can set the `OPENSSL_DIR` environment variable for the compilation process. See stderr section below for further information.
| error: failed to run custom build command for `openssl-sys v0.9.105`
解决方法:
- name: Fix openssl
working-directory: ./repo
run: |
if cargo tree -i openssl-sys| grep openssl; then
cargo add openssl --features vendored
fi