Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rust compiler "error: no matching package named `*` found" though it should be present

Tags:

rust

A while back I setup a project with the following in my Cargo.tml:

[dependencies]
reqwest = { version = "0.11", features = ["blocking", "json"] }

That all worked great. Now I tried to add an additional dependency by adding the line

teloxide = { version = "0.4", features = ["auto-send", "macros"] }

to Cargo.tml and get an error of:

error: no matching package named 'teloxide' found

I'm not sure what is the cause of this error, or what to investigate further - perhaps there is some way I can see which packages the compiler can list/recognize? I've found these two threads but they don't seem to provide any conclusive answer (I did try removed ~/.cargo which resulted in no change in behavior):

https://github.com/rust-lang/cargo/issues/6686 https://github.com/balena-os/balena-raspberrypi/issues/261

Potentially the issue is related to nix or naersk which I'm using.

like image 477
Chris Stryczynski Avatar asked Dec 04 '25 13:12

Chris Stryczynski


1 Answers

I landed on this page. I am sharing my shame, to save you time:

Failed:

async_process = "1.2.0"

Worked:

async-process = "1.2.0"

like image 159
rustyMagnet Avatar answered Dec 07 '25 13:12

rustyMagnet