我按照readme说明从源代码构建Parity然后执行此命令:
cargo build --release
然后:
~/.cargo/bin/cargo build --release
.. 按照指示;这两个导致我在提示挂起时收到以下消息:
Blocking waiting for file lock on the registry index
我在Mac上。
我有同样的问题,并与rm -rf ~/.cargo/registry/index/*
解决了。
运行cargo clean
似乎解决了这个问题。
当您同时运行同一项目的2个编译时,会发生这种情况。编译器使用锁定文件来避免数据争用问题。有一些可能性:
pkill rls
来解决这个问题。rm -rf ~/.cargo/registry/index/*
,如another answer所述。在按照接受的答案中的建议删除Cargo注册表索引之前,请确保当前没有其他进程正在编译Parity或任何其他Rust包。
我尝试按照Readme说明创建一个Polkadot节点。
我能够通过运行以下命令(复制/粘贴到Bash终端)来构建它:
git clone https://github.com/paritytech/polkadot;
cd polkadot; git checkout master;
rustup update nightly;
rustup target add wasm32-unknown-unknown --toolchain nightly;
rustup update stable;
rustup default stable;
cargo install --git https://github.com/alexcrichton/wasm-gc --force;
cargo install --git https://github.com/pepyakin/wasm-export-table.git --force;
brew install openssl; brew upgrade openssl;
rustc --version; cargo --version;
./build.sh;
cargo build;
cargo run -- --help;
./target/debug/polkadot --help;
然后我尝试使用以下命令运行Polkadot节点(这些命令是等效的):
./target/debug/polkadot -- --chain=dev --validator --key Alice -d /tmp/alice;
cargo run -- --chain=dev --validator --key Alice -d /tmp/alice;
但相反它显示了以下内容:
Blocking waiting for file lock on the git checkouts
Blocking waiting for file lock on build directory
我发现它是由CLion(Jetbrains IDE)引起的。
我通过关闭CLion解决了这个问题。我改为使用Visual Studio Code编辑器,它还允许使用断点调试Rust代码