yangwenmai/learning-rust

Q2: Blocking waiting for file lock on the registry index

yangwenmai opened this issue · 1 comments

问题

cargo buildcargo run 出现:Blocking waiting for file lock on the registry index

产生的原因

~/.cargo/registry/index/* 目录下有一些中间状态的文件。(可能是因为网络不好导致拉取错误。)

解决方案

cargo clean

参考资料

https://stackoverflow.com/questions/47565203/cargo-build-hangs-with-blocking-waiting-for-file-lock-on-the-registry-index-a

添加了新的依赖的时候也会出现这个, 可能是在下载依赖, 等一下就好了