When I run a program that uses this in3-rs crate I get an error. I expect it to be installed because I followed the directions here: https://crates.io/crates/in3
I installed the Requirements described here: https://crates.io/crates/in3 I am using Ubuntu 18, cargo 1.49.0, and rustc 1.49.0. I tried to install in3, in3-rs, in3-sys, and async-std each separately (with a sudo cargo install ). Each time I got a message saying "error: specified package... has no binaries"
I ran this command: cargo install --list
I saw this:
ripgrep v12.1.1:
rg
I tried using a variety of different Cargo.toml files. But to install the ripgrep crate, I needed no Cargo.toml file.
I ran this command: sudo cargo install in3
But I saw this:
[sudo] password for jdoe: Updating crates.io index error: specified package
in3 v0.1.7
has no binaries
A relevant version is returned in the output. My Ubuntu server has access to the internet. I have googled this problem, and I think that SO is where questions about Rust should be asked.
I tried the three suggestions for the content of the file for Cargo.toml that this link has.
When my Cargo.toml file had this stanza in3 = "0.1.7"
, the error was reproducible.
I had the same error when my Cargo.toml file had these two lines:
[dependencies]
in3 = "0.0.2"
The error was reproduced a third time when my Cargo.toml file had these three lines:
[dependencies]
async-std = "1.5.0"
in3 = "0.2.0"
To reproduce the problem, I ran "sudo cargo install in3"
I also tried to use sudo cargo install
(without an argument to install) with the two Cargo.toml versions with the [dependencies] stanza. But I got this error on those attempts:
error: failed to parse manifest at
/opt/in3-3.1.2/rust/Cargo.toml
Caused by: this virtual manifest specifies a [dependencies] section, which is not allowed
I tried using this as the Cargo.toml (and another version without the [dependencies] section):
[package]
name = "in3"
version = "0.2.0"
edition = '2018'
[dependencies]
async-std = "1.5.0"
in3 = "0.2.0"
I saw this:
Updating crates.io index error: specified package `in3 v0.1.7` has no binaries
Update: I used "sudo cargo build" with this as my Cargo.toml file:
[package]
name = "in3"
version = "0.1.7"
edition = "2018"
[[bin]]
name = "in3"
path = "/home/jdoe/rust/contint.rs"
[dependencies]
async-std = "1.5.0"
in3 = "0.1.7"
It worked. I then ran sudo cargo run
, and it worked. But when I ran sudo cargo install in3
, I got an error.
I ran this: cargo install --list
But in3 is still not installed. I ran a rust program, and it confirmed that in3 is not installed.
UPDATE (more recent): I ran rustc foobar.rs
But I saw this:
error[E0433]: failed to resolve: maybe a missing crate
in3
? --> foobar.rs:4:5 | 4 | use in3::eth1::*; | ^^^ maybe a missing cratein3
?
How do I install the in3 crate?