首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >由于日志版本的原因,无法添加托盘刻度

由于日志版本的原因,无法添加托盘刻度
EN

Stack Overflow用户
提问于 2021-06-08 17:24:57
回答 2查看 86关注 0票数 1

我正在学习基础知识和

我只是在学习一些教程。

在第二个教程(https://substrate.dev/docs/en/tutorials/add-a-pallet/import-a-pallet)中,由于下面的错误,我无法继续。

代码语言:javascript
复制
Execution failed (exit code 101).
/Users/~~~/.cargo/bin/cargo metadata --verbose --format-version 1 --all-features
stdout :     Updating git repository `https://github.com/paritytech/substrate.git`
    Updating crates.io index
error: failed to select a version for `log`.
    ... required by package `frame-support v3.0.0 (https://github.com/paritytech/substrate.git?tag=monthly-2021-05#70ef0afc)`
    ... which is depended on by `pallet-nicks v3.0.0 (https://github.com/paritytech/substrate.git?tag=monthly-2021-05#70ef0afc)`
    ... which is depended on by `node-template-runtime v3.0.0 (/Users/~~~/projects/substrate-node-template/runtime)`
    ... which is depended on by `node-template v3.0.0 (/Users/~~~/projects/substrate-node-template/node)`
versions that meet the requirements `^0.4.14` are: 0.4.14

all possible versions conflict with previously selected packages.

  previously selected package `log v0.4.13`
    ... which is depended on by `finality-grandpa v0.13.0`
    ... which is depended on by `sc-finality-grandpa v0.9.0`
    ... which is depended on by `node-template v3.0.0 (/Users/~~~/projects/substrate-node-template/node)`

failed to select a version for `log` which could resolve this conflict

stderr : 

当我在运行时/Cargo.toml上添加了关于教程内容的托盘-记号和特性时,就会发生这种情况。

在此之前,一切都很好。

EN

回答 2

Stack Overflow用户

发布于 2021-06-09 21:18:21

我找到了一个解决方法,就是在cargo.toml上手动添加日志依赖,如下所示

代码语言:javascript
复制
# cargo.toml
log = '^0.4.14'

它是正常的,但是在下一步之后我遇到了另一个问题(它在配置后无法构建),所以我只使用了答案分支(add-a-pallet-v3.0.0+monthly-2021-05),它是正常的……

票数 1
EN

Stack Overflow用户

发布于 2021-06-16 18:37:52

我遇到了同样的错误。解决方法是:在您的cargo.toml中,不要添加:"pallet-nicks ={ default-features = false,version = '3.0.0',git = 'https://github.com/paritytech/substrate.git',tag = 'monthly-2021-05‘}“,只需添加"pallet-nicks ={ default-features = false,version = '3.0.0'}”即可。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67884930

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档