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

error: could not learn metadata for #12589

Closed
Thomblin opened this issue Aug 29, 2023 · 4 comments
Closed

error: could not learn metadata for #12589

Thomblin opened this issue Aug 29, 2023 · 4 comments
Labels
A-filesystem Area: issues with filesystems C-bug Category: bug O-windows OS: Windows S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request.

Comments

@Thomblin
Copy link

Problem

I try to run cargo publish --dry-run using WSL 2 with Debian on Windows 10

The command gives me two different errors whenever I try to execute it (without changing something in between)

me@home:/mnt/c/Users/me/development/rust/convert_string$ cargo publish --dry-run
Updating crates.io index
Packaging convert_string v0.1.0 (/mnt/c/Users/me/development/rust/convert_string)
Verifying convert_string v0.1.0 (/mnt/c/Users/me/development/rust/convert_string)
error: failed to verify package tarball

Caused by:
Permission denied (os error 13)

me@home:/mnt/c/Users/me/development/rust/convert_string$ cargo publish --dry-run
Updating crates.io index
Packaging convert_string v0.1.0 (/mnt/c/Users/me/development/rust/convert_string)
Verifying convert_string v0.1.0 (/mnt/c/Users/me/development/rust/convert_string)
Compiling convert_string v0.1.0 (/mnt/c/Users/me/development/rust/convert_string/target/package/convert_string-0.1.0)
Finished dev [unoptimized + debuginfo] target(s) in 1.38s
error: could not learn metadata for: /mnt/c/Users/me/development/rust/convert_string/target/package/convert_string-0.1.0.crate

Caused by:
No such file or directory (os error 2)

the mentioned file exists and is readable by the current user

I tried cargo clean as well as installing additional tools (build-essentials, clang, cmake)

Steps

  1. cargo publish --dry-run

Possible Solution(s)

No response

Notes

No response

Version

cargo 1.71.0 (cfd3bbd8f 2023-06-08)
release: 1.71.0
commit-hash: cfd3bbd8fe4fd92074dfad04b7eb9a923646839f
commit-date: 2023-06-08
host: x86_64-unknown-linux-gnu
libgit2: 1.6.4 (sys:0.17.1 vendored)
libcurl: 8.0.1-DEV (sys:0.4.61+curl-8.0.1 vendored ssl:OpenSSL/1.1.1t)
ssl: OpenSSL 1.1.1t  7 Feb 2023
os: Debian 11.0.0 [64-bit]
@Thomblin Thomblin added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Aug 29, 2023
@Thomblin
Copy link
Author

Update: It works when I move the project into the WSL home directory, so far it was located at a mounted windows directory

@weihanglo weihanglo added O-windows OS: Windows A-filesystem Area: issues with filesystems S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request. and removed S-triage Status: This issue is waiting on initial triage. labels Sep 6, 2023
@weihanglo
Copy link
Member

Probably attributed to the same root cause of #11677?

@Thomblin
Copy link
Author

Thomblin commented Sep 8, 2023

@weihanglo That topic sounds related, however I had no issues with cargo build run or test so far

@weihanglo
Copy link
Member

underlying they share the same code path. I'll close this in favor of that. Thank you :)

@weihanglo weihanglo closed this as not planned Won't fix, can't repro, duplicate, stale Sep 11, 2023
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 S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request.
Projects
None yet
Development

No branches or pull requests

2 participants