platon-truffle安装失败

root@ubuntu20:~# npm install -g platon-truffle@0.13.1
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
/usr/local/node-v10.12.0-linux-x64/bin/platon-truffle -> /usr/local/node-v10.12.0-linux-x64/lib/node_modules/platon-truffle/build/cli.bundled.js

platon-truffle@0.13.1 postinstall /usr/local/node-v10.12.0-linux-x64/lib/node_modules/platon-truffle
node ./scripts/postinstall.js

Error: Error while attempting to download and cache solc 0.5.12: Command failed: node ./build/cli.bundled.js obtain --solc=0.5.12
at postinstallObtain (/usr/local/node-v10.12.0-linux-x64/lib/node_modules/platon-truffle/scripts/postinstall.js:13:11)
at Object. (/usr/local/node-v10.12.0-linux-x64/lib/node_modules/platon-truffle/scripts/postinstall.js:20:3)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)

  • platon-truffle@0.13.1
    added 27 packages from 439 contributors in 40.131s

首先请确保本地成功安装了nodeJS环境,由于该项目使用了lerna管理工具来优化托管在git\npm上的多package代码库的工作流,所以你在安装之前确保已经全局安装了lerna包。 如果没有,执行命令 npm i lerna -g 进行全局安装。

文档已经写的很详细啦 https://devdocs.alaya.network/alaya-devdocs/zh-CN/JS_SDK/

谢谢,我试一下。
我原来看的教程是 https://platon-truffle.readthedocs.io/en/v0.13.1/getting-started/installation.html

npm install -g alaya-truffle@0.13.2 出错

参照文档:
https://platon-truffle.readthedocs.io/en/alaya/getting-started/installation.html

执行 npm install -g platon-truffle@0.13.1 和 npm install -g alaya-truffle@0.13.2 出现同样的错误: