Description of problem: The Rust standard library[1] is available to all Rust crates by default. So it is an important part to develop in Rust on Fedora. [1] https://doc.rust-lang.org/std/ Version-Release number of selected component (if applicable): $ rpm -qa | grep rust rust-std-static-1.13.0-1.fc25.x86_64 rust-1.13.0-1.fc25.x86_64 $ rpm -qa | grep cargo cargo-0.14.0-2.fc25.x86_64 How reproducible: Steps to Reproduce: 1. cargo new testProject --bin 2. cd testProject/ 3. cargo build Actual results: $ cargo build Compiling testProject v0.1.0 (file:///home/flo/testProject) error[E0463]: can't find crate for `std` error: aborting due to previous error error: Could not compile `testProject`. Expected results: cargo should build the project successfully.
Hey! I did some further investigation. In my case, there is a folder called "rustlib" in /usr/lib64/ which is empty. There is also a folder called "rustlib" in /usr/lib/ which contains the .rlib files. So I deleted the empty "rustlib" folder in /usr/lib64. Now cargo builds and runs the projects as expected. -> Closing Report.
Hmm, we used to package it as /usr/lib64/rustlib/, but switched to /usr/lib/ in the 1.13 update so that multilib could work all in the same place. I wonder why your system left an empty folder? Well, I'm glad you got it working!
For what it's worth, I hit the same issue, empty /usr/lib64/rustlib package which led to a seemingly totally unrelated failure (I don't think I would have figured it out if I hadn't found this bug).
This happened to me as well. I was using the fedora copr repository previously, I wonder if that could have caused the problem? Anyway I was glad to find this bug, pretty sure I never would have found the solution on my own.