我在从我的系统中卸载装货的包裹时遇到了麻烦。
有些包(如rand-0.3.22 )显然是在$HOME/.cargo下安装的。
ls ~/.cargo/registry/src/github.com-1ecc6299db9ec823/ra
racer-2.0.14/ rand-0.3.22/ rand-0.4.2/
rand-0.4.3/ rand-0.5.5/ rand_core-0.2.1/
rawpointer-0.1.0/ rayon-1.0.2/ rayon-core-1.4.1/这也可以使用cargo pkgid进行验证。
cargo pkgid -p rand
error: There are multiple `rand` packages in your project, and the specification `rand` is ambiguous.
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
rand:0.5.5
rand:0.4.3
rand:0.3.22但是,我无法用cargo uninstall删除该包。这些似乎都不起作用:
cargo uninstall randcargo uninstall -- rand:0.4.3cargo uninstall https://github.com/rust-lang/crates.io-index#rand:0.4.3对于上面的任何命令,我得到:
error: invalid package id specification: <name-of-package-i-specified>这似乎是一个相当基本的操作,因此我怀疑它对于如何使用cargo-uninstall是很基本的。
有什么指示吗?
发布于 2018-08-19 16:55:43
cargo uninstall消除了cargo install的作用。您没有cargo install rand,因为它只是一个库,而不是一个可执行程序。这意味着它没有安装。
~/.cargo/registry只是构建依赖项的缓存。随时可以随意擦拭,货物将重新下载并重新建造它需要的任何时候。
是的,这是错误的。Cargo应该酌情使用.local、.config和.cache;那么很明显,您只需清理一下即可。在这个时代,使用任意的点脏是一种侮辱。据报道,可能有好几次。还没人能修好它。
https://stackoverflow.com/questions/51917952
复制相似问题