Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust unable to perform cargo run and cargo build on WSL #8184

Closed
rchrdrussell opened this issue Apr 30, 2020 · 1 comment · Fixed by #8185
Closed

Rust unable to perform cargo run and cargo build on WSL #8184

rchrdrussell opened this issue Apr 30, 2020 · 1 comment · Fixed by #8185
Labels
A-filesystem Area: issues with filesystems C-bug Category: bug O-windows OS: Windows

Comments

@rchrdrussell
Copy link

Problem

While learning Rust, I experienced a problem regarding cargo build and cargo run .
The error code is as follows:

richardrussell@Russell: /mnt/c/Users/Russell/amorfati/rust/test_file/src$ cargo run
Compiling test_file v0.1.0 (/mnt/c/Users/Russell/amorfati/rust/test_file)
error: Operation not permitted (os error 1)

Aside from these two, other commands such as cargo new works perfectly.
Steps

  1. Create a new cargo directory using cargo new
  2. Since cargo new will create a default main.rs file with "Hello, World", we can automatically run cargo run
  3. The error message will appear as above

Possible Solution(s)

Notes

Output of cargo version:
cargo 1.43.0 (3532cf7 2020-03-17)

Installation method: Since this uses WSL, my Ubuntu version is Ubunutu 18.04.4 LTS which I downloaded over from the Microsoft Store. I also installed Rust using the WSL command in their website (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh)

@ehuss
Copy link
Contributor

ehuss commented Apr 30, 2020

Thanks for the report. For now, I think you'll need to use a local Ubuntu filesystem. The mounted Windows filesystems don't seem to support file mtime modifications. I have posted a fix at #8185.

@ehuss ehuss added A-filesystem Area: issues with filesystems O-windows OS: Windows labels Apr 30, 2020
@bors bors closed this as completed in ba832ac Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-filesystem Area: issues with filesystems C-bug Category: bug O-windows OS: Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants