Blocking waiting for file lock on the registry index 问题解决

问题表现:

cargo build时一直卡在Blocking waiting for file lock on the registry index。

解决方法:

1、之前在linux下出现过一次,采用这种方法解决了:rust - Cargo build hangs with " Blocking waiting for file lock on the registry index" after building parity from source - Stack Overflow

复制代码
rm -rf ~/.cargo/registry/index/* ~/.cargo/.package-cache

2、这次出现在windows上,按道理删除对应的文件夹也能解决。

但是想到既然显示的文件锁被占用,肯定是被其他进程占了,只需要把对应进程杀掉就好。

首先找到被占用的文件夹:

然后查找是谁占用它的

把这些进程都杀掉,问题解决!

相关推荐
SomeOtherTime5 小时前
第 9 讲:异步并发与 Pin 的底层解剖——async/await 无栈协程状态机脱糖、自引用死锁的终极救赎与 Future/Waker 驱动模型
rust
wflynn21 小时前
GitHub 今日推荐|Stela:在 PC 上直接启动 macOS 的翻译层
rust·开源·github
aifannihao1 天前
Rust 1.100 的 DropGuard:用 Python 实测失败回滚与吞异常
python·rust·异常处理·标准库·contextlib
鶴哥只手遮天1 天前
《rustc 内幕》第 1 章 全景:rustc 编译流水线与 crate 版图
后端·rust·开源
SomeOtherTime2 天前
Rust 闭包语法和原理(AI回答)
开发语言·后端·rust
SomeOtherTime2 天前
Rust集合(AI回答)
开发语言·后端·rust
SomeOtherTime3 天前
Rust 泛型与特性讲解(AI回答)
rust
青川Lapis3 天前
RUST:错误处理 thiserror + anyhow 工程化
rust
SomeOtherTime3 天前
Rust生命周期介绍(AI回答)
开发语言·后端·rust
SomeOtherTime4 天前
Rust所有权(AI回答)
开发语言·后端·rust