首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >slither不在我的linux环境中工作。

slither不在我的linux环境中工作。
EN

Ethereum用户
提问于 2022-12-02 08:57:33
回答 1查看 184关注 0票数 0
代码语言:javascript
复制
slither test/TestUtils.sol
Traceback (most recent call last):
  File "/home/mente/.local/lib/python3.10/site-packages/slither/__main__.py", line 826, in main_impl
    ) = process_all(filename, args, detector_classes, printer_classes)
  File "/home/mente/.local/lib/python3.10/site-packages/slither/__main__.py", line 86, in process_all
    compilations = compile_all(target, **vars(args))
  File "/home/mente/.local/lib/python3.10/site-packages/crytic_compile/crytic_compile.py", line 637, in compile_all
    compilations.append(CryticCompile(target, **kwargs))
  File "/home/mente/.local/lib/python3.10/site-packages/crytic_compile/crytic_compile.py", line 117, in init
    self._compile(**kwargs)
  File "/home/mente/.local/lib/python3.10/site-packages/crytic_compile/crytic_compile.py", line 548, in _compile
    self._platform.compile(self, **kwargs)
  File "/home/mente/.local/lib/python3.10/site-packages/crytic_compile/platform/solc.py", line 154, in compile
    targets_json = _get_targets_json(compilation_unit, self._target, **kwargs)
  File "/home/mente/.local/lib/python3.10/site-packages/crytic_compile/platform/solc.py", line 276, in _get_targets_json
    return _run_solc(
EN

回答 1

Ethereum用户

发布于 2022-12-02 18:24:13

造成此错误的一个可能原因是安装在系统上的低温编译库的版本与您正在使用的Python版本不兼容。错误消息提到正在使用Python3.10,但最新版本的低温编译只支持Python3.6、3.7和3.8。

要解决此问题,可以尝试卸载当前版本的低温编译并安装兼容版本。您可以在其GitHub页面:https://github.com/crytic/crytic-compile上查看支持的Python版本以获得最新版本的超低温编译。

一旦安装了兼容版本的低温编译,您应该能够使用Slither来分析您的合同,而不会遇到此错误。再次检查Slither的所有其他依赖项是否已经安装并更新,这也是一个好主意,因为这有时会导致类似的问题。

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

https://ethereum.stackexchange.com/questions/140419

复制
相关文章

相似问题

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