Run errors! #2529
Unanswered
callmeitachi
asked this question in
Q&A
Run errors!
#2529
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I created project at native,it can run very well.But i upload it to server through putty,run 'dx serve --release' command,it give me an error with
"root@hecs-336969:/home/hadoop/client# dx serve --release
| 💼 Waiting to start building the project... warning:
/root/.cargo/config
is deprecated in favor ofconfig.toml
note: if you need to support cargo 1.38 or earlier, you can symlink
config
toconfig.toml
/ ⚙️ Compiling registry+https://github.com/rust-lang/crates.io-index#[email protected] error: failed to run custom build command for
openssl-sys v0.9.102
Caused by:
process didn't exit successfully:
/home/hadoop/client/target/release/build/openssl-sys-55535669f52c9972/build-script-main
(exit status: 101)--- stdout
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
X86_64_UNKNOWN_LINUX_GNU_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_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=OPENSSL_STATIC
cargo:rerun-if-env-changed=OPENSSL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
run pkg_config fail:
pkg-config exited with status code 1
The system library
openssl
required by crateopenssl-sys
was not found.The file
openssl.pc
needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.The PKG_CONFIG_PATH environment variable is not set.
HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing
openssl.pc
.--- stderr
thread 'main' panicked at /root/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/openssl-sys-0.9.102/build/find_normal.rs:190:5:
Could not find directory of OpenSSL installation, and this
-sys
crate cannotproceed without this knowledge. If OpenSSL is installed and this crate had
trouble finding it, you can set the
OPENSSL_DIR
environment variable for thecompilation process.
Make sure you also have the development packages of openssl installed.
For example,
libssl-dev
on Ubuntu oropenssl-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 = x86_64-unknown-linux-gnu
openssl-sys = 0.9.102
note: run with
RUST_BACKTRACE=1
environment variable to display a backtraceError: 🚫 Serving project failed:
Caused by:
Build failed",
How to resolve it?
This is my native Cargo.toml file
"[package]
name = "dioxus-web"
version = "0.1.0"
authors = ["callmeitachi [email protected]"]
edition = "2021"
[dependencies]
dioxus = { version = "0.5", features = ["web", "router"] }
tracing = "0.1.40"
dioxus-logger = "0.5.0"
gloo-storage = "0.3.0"
gloo-net = {version = "0.5.0",features = ["http"]}
gloo = {version = "0.11.0",features = ["console"]}
serde = { version = "1.0.197", features = ["derive"] }
serde_json="1.0"
reqwest = {version="0.12.0",features=["json"]}
web-sys = {version="0.3",features = ["Document","Node","Window","Element","HtmlElement","HtmlSelectElement","Event","EventTarget"]}
manganis = "0.2.2"
dioxus-web = "0.5.0""
And I change it with
"[package]
name = "client"
version = "0.1.0"
authors = ["callmeitachi [email protected]"]
edition = "2021"
[dependencies]
dioxus = { version = "0.5", features = ["web", "router"] }
tracing = "0.1.40"
dioxus-logger = "0.5.0"
gloo-storage = "0.3.0"
gloo-net = {version = "0.5.0",features = ["http"]}
gloo = {version = "0.11.0",features = ["console"]}
serde = { version = "1.0.197", features = ["derive"] }
serde_json="1.0"
web-sys = {version="0.3",features = ["Document","Node","Window","Element","HtmlElement","HtmlSelectElement","Event","EventTarget"]}
dioxus-web = "0.5.0"",
And it can work,Why?
Beta Was this translation helpful? Give feedback.
All reactions