[Solved] Error while installing parity with cargo install

#1

Hello!
I’m starting on this
I’m reading the ‘mastering ethereum’ e-book and I’m having trouble to follow the book’s how to install parity
I’ve installed: git, go, openssl libssl-dev libudev-dev cmake, and cargo (by apt)
go version: 1.11.5 linux/amd64
cargo 1.30.0
I’ve cloned parity from github at https://github.com/paritytech/parity
after download and change directory to parity folder i did

cargo install
error: failed to parse manifest at `/home/roger/parity/ethcore/call-contract/Cargo.toml`

Caused by:
feature `rename-dependency` is required

consider adding `cargo-features = ["rename-dependency"]` to the manifest

Then, i tried to add cargo-features = ["rename-dependency] to Cargo.toml
after that, the following error after trying to cargo install again:

cargo install
error: failed to parse manifest at `/home/roger/parity/ethcore/call-contract/Cargo.toml`

Caused by:
invalid type: sequence, expected a version string like "0.9.8" or a detailed dependency like { version = "0.9.8" } for key `dependencies.cargo-features`

Cargo.toml:

[package]
name = "ethcore-call-contract"
version = "0.1.0"
license = "GPL-3.0"
authors = ["Parity Technologies [admin@parity.io](mailto:admin@parity.io)"]
edition = "2018"

[dependencies]
types = { path = "../types", package = "common-types" }
ethereum-types = "0.4"
bytes = { version = "0.1", package = "parity-bytes" }
cargo-features = ["rename-dependency"]

Sorry if im being too noob I really am :slight_smile:
Thx

1 Like

#2

I’m confused about whether you’re trying to build parity from source or if you’re trying to install and run a released version of parity: If you’ve cloned parity from github, it seems like you’re trying to build from source, in which case you should probably follow the instructions in parity’s README in the section “Build from source code”, that is, use cargo build instead of cargo install.

However, if you don’t want to modify parity’s code and you want to install and run a released version, then cargo install is what you want and you don’t need to clone parity from github. I don’t see anything in parity’s repo about supporting cargo install though…

1 Like

#3

I got some help from a reddit user, i needed to add
cargo-features = [“rename-dependency”] above the [package] line.
Moving on, now i have this error
Compiling parity-rocksdb v0.5.0
Compiling parity-daemonize v0.1.1
error: Edition 2018 is unstable and only available for nightly builds of rustc.

error: Could not compile parity-daemonize.
warning: build failed, waiting for other jobs to finish…
error: build failed
This happens both with cargo install or cargo build…
I read that maybe my rust is not up to date, but i can’t understand since i’ve downloaded it from rustup.rs

1 Like

#4

Try cargo-features = "*"

1 Like

#5

i fixed!!
I needed to update my rust to 1.32 but i was having trouble with it… so i figured out that maybe my $HOME/.profile file didn’t have rust or cargo in it… so i updated it and reboot and… voilà! i
i was able to update my rust by running rustup update and now the installer was able to compile all 447 files of parity :slight_smile: :slight_smile: :slight_smile: THX ALL!!

1 Like