I introduced openssl in the container and cannot deploy
Cargo.toml
openssl="0.10"
openssl-sys = "0.9.82"
The error message is
Deploying all canisters.
All canisters have already been created.
Building canisters...
Compiling openssl-sys v0.9.82
error: failed to run custom build command for `openssl-sys v0.9.82`
Caused by:
process didn't exit successfully: `/home/xxx/projects/rust_projects/xxx/target/release/build/openssl-sys-05cad7bcb59e493b/build-script-main` (exit status: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=WASM32_UNKNOWN_UNKNOWN_OPENSSL_LIB_DIR
WASM32_UNKNOWN_UNKNOWN_OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=WASM32_UNKNOWN_UNKNOWN_OPENSSL_INCLUDE_DIR
WASM32_UNKNOWN_UNKNOWN_OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=WASM32_UNKNOWN_UNKNOWN_OPENSSL_DIR
WASM32_UNKNOWN_UNKNOWN_OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_DIR
OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_wasm32-unknown-unknown
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_wasm32_unknown_unknown
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG_wasm32-unknown-unknown
cargo:rerun-if-env-changed=PKG_CONFIG_wasm32_unknown_unknown
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_wasm32-unknown-unknown
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_wasm32_unknown_unknown
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
run pkg_config fail: pkg-config has not been configured to support cross-compilation.
Install a sysroot for the target platform and configure it via
PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a
cross-compiling wrapper for pkg-config and set it via
PKG_CONFIG environment variable.
--- stderr
thread 'main' panicked at '
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.
Make sure you also have the development packages of openssl installed.
For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.
If you're in a situation where you think the directory *should* be found
automatically, please open a bug at https://github.com/sfackler/rust-openssl
and include information about your system as well as this message.
$HOST = x86_64-unknown-linux-gnu
$TARGET = wasm32-unknown-unknown
openssl-sys = 0.9.82
', /home/xxx/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.82/build/find_normal.rs:190:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Shrink WASM module size.
Building frontend...
WARN: Generating type declarations for canister xxx_backend:
src/declarations/xxx_backend/xxx_backend.did.d.ts
src/declarations/xxx_backend/xxx_backend.did.js
/home/xxx/projects/rust_projects/xxx/src/xxx_backend/xxx_backend.did
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
Failed to build call canisters.
Failed while trying to build all canisters.
The build step failed for canister 'rrkah-fqaaa-aaaaa-aaaaq-cai' (xxx_backend) with an embedded error: Failed to build Rust canister 'xxx_backend'.: Failed to compile the rust package: xxx_backend