When attempting to deploy my canisters using dfx deploy, the build process fails for the dfinity_js_backend canister. The error message indicates that the openssl-sys crate is unable to find the required files to link OpenSSL.
Steps to Reproduce:
- Run
dfx start --clean to start the local replica.
- Run
dfx deploy to deploy all canisters.
- Observe the build error for the
dfinity_js_backend canister.
The build process fails with the following error message:
Error: Command failed: cd .azle/dfinity_js_backend && /root/.config/azle/rust/1.73.0/bin/cargo build --target wasm32-wasi --manifest-path canister/Cargo.toml --release
...
thread 'main' panicked at /root/.config/azle/rust/1.73.0/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.99/build/main.rs:406:13:
OpenSSL libdir at `["/usr/lib64", "/usr/lib"]` does not contain the required files to either statically or dynamically link OpenSSL
...
**Environment:**
- Operating System: [e.g., Ubuntu 20.04]
- Rust Version: [output of `rustc --version`]
- OpenSSL Version: [output of `openssl version`]
- dfx Version: [output of `dfx --version`]
**Attempts to Resolve:**
- Installed `pkg-config` and `libssl-dev`.
- Verified that `pkg-config` is in the PATH.
- Set `OPENSSL_DIR` environment variable.
- Checked permissions and paths for OpenSSL libraries.
Has anyone experienced a similar issue or have any suggestions on what might be wrong with my configuration or build process? What is the best way to resolve this OpenSSL linking problem?
When attempting to deploy my canisters using
dfx deploy, the build process fails for thedfinity_js_backendcanister. The error message indicates that theopenssl-syscrate is unable to find the required files to link OpenSSL.Steps to Reproduce:
dfx start --cleanto start the local replica.dfx deployto deploy all canisters.dfinity_js_backendcanister.The build process fails with the following error message: