英文:
Error compiling 'diesel' while installing Sui on virtual Ubuntu machine using Rust and Cargo
问题
这是您要翻译的内容:
"It's my first public question here, I'm sorry if it lacks any information.
I'm trying to install Sui install Sui on a virtual Ubuntu machine on WSL2.
This is using Rust, although I'm as well pretty new to this.
Before installing Sui, I installed the prerequisites detailed in the page below, and then tried to build sui binaries using :
cargo install --locked --git https://github.com/MystenLabs/sui.git --branch devnet sui
However, by doing so, the cargo installer encounters an error compiling "diesel", which aborts the process:
error: could not compile `diesel`
Caused by:
process didn't exit successfully: `rustc --crate-name diesel --edition=2018 /home/antoine/.cargo/registry/src/github.com-1ecc6299db9ec823/diesel-2.0.3/src/lib.rs
--error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat
--diagnostic-width=120 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort
-C embed-bitcode=no -C split-debuginfo=packed -C debuginfo=1 --cfg 'feature="32-column-tables"'
--cfg 'feature="64-column-tables"' --cfg 'feature="bitflags"' --cfg 'feature="byteorder"'
--cfg 'feature="chrono"' --cfg 'feature="default"'
--cfg 'feature="i-implement-a-third-party-backend-and-opt-into-breaking-changes"' --cfg 'feature="itoa"'
--cfg 'feature="postgres"' --cfg 'feature="postgres_backend"' --cfg 'feature="pq-sys"'
--cfg 'feature="r2d2"' --cfg 'feature="serde_json"' --cfg 'feature="with-deprecated"'
-C metadata=910cbefe446c683d -C extra-filename=-910cbefe446c683d
--out-dir /tmp/cargo-installjxLb2t/release/deps -C strip=debuginfo
-L dependency=/tmp/cargo-installjxLb2t/release/deps
--extern bitflags=/tmp/cargo-installjxLb2t/release/deps/libbitflags-e5949a39186627ea.rmeta
--extern byteorder=/tmp/cargo-installjxLb2t/release/deps/libbyteorder-2d235bc7037b2d93.rmeta
--extern chrono=/tmp/cargo-installjxLb2t/release/deps/libchrono-2b0c9aaf0e3f3a01.rmeta
--extern diesel_derives=/tmp/cargo-installjxLb2t/release/deps/libdiesel_derives-c7bad2300e3f2750.so
--extern itoa=/tmp/cargo-installjxLb2t/release/deps/libitoa-353c8ba210cb8889.rmeta
--extern pq_sys=/tmp/cargo-installjxLb2t/release/deps/libpq_sys-48f4ec31a3125d17.rmeta
--extern r2d2=/tmp/cargo-installjxLb2t/release/deps/libr2d2-e4794e946ea0d116.rmeta
--extern serde_json=/tmp/cargo-installjxLb2t/release/deps/libserde_json-fc3f78b6b0c3ee9f.rmeta
--cap-lints allow -L native=/usr/lib/x86_64-linux-gnu` (signal: 9, SIGKILL: kill)
I added returns between args in the hope to make it clearer if it can help.
I don't really know what I am doing, but I am ready to provide any resource you'd need to help me solve this issue, as long as you can explain to me how to get it.
To identify the issue, I looked for other issues concerning building "diesel_cli", which looked to be related to "diesel", which were solved by installing other dependencies that I then installed, but it didn't solve my issue.
I also tried to build only "diesel_cli" :
cargo install diesel_cli
Which worked but still didn't allow me to build the whole Sui package :("
英文:
It's my first public question here, I'm sorry if it lacks any information.
I'm trying to install Sui install Sui on a virtual Ubuntu machine on WSL2.
This is using Rust, although I'm aswell pretty new to this.
Before installing Sui, I installed the prerequisites detailed in the page below, and then tried to build sui binaries using :
cargo install --locked --git https://github.com/MystenLabs/sui.git --branch devnet sui
However by doing so, the cargo installer encounters an error compiling "diesel", which aborts the process :
error: could not compile `diesel`
Caused by:
process didn't exit successfully: `rustc --crate-name diesel --edition=2018 /home/antoine/.cargo/registry/src/github.com-1ecc6299db9ec823/diesel-2.0.3/src/lib.rs
--error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat
--diagnostic-width=120 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort
-C embed-bitcode=no -C split-debuginfo=packed -C debuginfo=1 --cfg 'feature="32-column-tables"'
--cfg 'feature="64-column-tables"' --cfg 'feature="bitflags"' --cfg 'feature="byteorder"'
--cfg 'feature="chrono"' --cfg 'feature="default"'
--cfg 'feature="i-implement-a-third-party-backend-and-opt-into-breaking-changes"' --cfg 'feature="itoa"'
--cfg 'feature="postgres"' --cfg 'feature="postgres_backend"' --cfg 'feature="pq-sys"'
--cfg 'feature="r2d2"' --cfg 'feature="serde_json"' --cfg 'feature="with-deprecated"'
-C metadata=910cbefe446c683d -C extra-filename=-910cbefe446c683d
--out-dir /tmp/cargo-installjxLb2t/release/deps -C strip=debuginfo
-L dependency=/tmp/cargo-installjxLb2t/release/deps
--extern bitflags=/tmp/cargo-installjxLb2t/release/deps/libbitflags-e5949a39186627ea.rmeta
--extern byteorder=/tmp/cargo-installjxLb2t/release/deps/libbyteorder-2d235bc7037b2d93.rmeta
--extern chrono=/tmp/cargo-installjxLb2t/release/deps/libchrono-2b0c9aaf0e3f3a01.rmeta
--extern diesel_derives=/tmp/cargo-installjxLb2t/release/deps/libdiesel_derives-c7bad2300e3f2750.so
--extern itoa=/tmp/cargo-installjxLb2t/release/deps/libitoa-353c8ba210cb8889.rmeta
--extern pq_sys=/tmp/cargo-installjxLb2t/release/deps/libpq_sys-48f4ec31a3125d17.rmeta
--extern r2d2=/tmp/cargo-installjxLb2t/release/deps/libr2d2-e4794e946ea0d116.rmeta
--extern serde_json=/tmp/cargo-installjxLb2t/release/deps/libserde_json-fc3f78b6b0c3ee9f.rmeta
--cap-lints allow -L native=/usr/lib/x86_64-linux-gnu` (signal: 9, SIGKILL: kill)
I added returns between args in the hope to make it clearer if it can help.
I don't really know what I am doing, but I am ready to provide any ressource you'd need to help me solve this issue, as long as you can explain me how to get it.
To identify the issue, I looked for other issues concerning building "diesel_cli", which looked to be related to "diesel", which were solved by installing other dependencies that I then installed, but it didn't solve my issue.
I also tried to build only "diesel_cli" :
cargo install diesel_cli
Which worked, but still didn't allow me to build the whole sui package
答案1
得分: 1
如果你只是为了 PostgreSQL 安装 diesel_cli
。
首先,你需要在 Ubuntu 中安装 libpq
,你可以这样安装它。
sudo apt install libpq-dev
之后,你可以只安装带有 PostgreSQL 特性的 diesel_cli
。也许你需要先卸载 diesel_cli
。
cargo uninstall diesel_cli
cargo install diesel_cli --features=postgres --no-default-features
然后尝试安装 sui
crate。
英文:
If you are installing diesel_cli
only for PostgreSQL.
First you need to install libpq
in Ubuntu you can install it this way.
sudo apt install libpq-dev
After that you can install diesel_cli
with postgreSQL features only. Maybe you need to uninstall diesel_cli
first.
cargo uninstall diesel_cli
cargo install diesel_cli --features=postgres --no-default-features
Then try to install sui
crate
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论