cryptape / ethereum-bootstrap

Starter kit to ethereum private chain.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

运行第二步时报错Syntax error: word unexpected (expecting "do")

ghost0913 opened this issue · comments

在运行第二步./bin/import_keys.sh 时,交互报错。更改管理员权限后也无效
: not foundt_keys.sh: 2:
***** Using geth at: geth
: not foundt_keys.sh: 5:
***** Import all pre-funded private keys
: not foundt_keys.sh: 7:
***** Enter password for the new wallet: a1234567899
: bad variable nameh: 8: read: password
: not foundt_keys.sh: 9:
./bin/import_keys.sh: 11: Syntax error: word unexpected (expecting "do")

解决了,可能原因是在windows上打开了文件import_keys.sh,导致文件里有windows的结束符。
解决方式 要先在ubuntu上安装dos2unix,然后用命令dos2unix /bin/import_keys.sh把文件转换格式,再执行./bin/import_keys.sh就成功了