Reputation: 1
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 :(
Upvotes: 0
Views: 352
Reputation: 386
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
Upvotes: 1