安装 Starport
三个前提条件:
- Golang >=1.14
- Protocol Buffer compiler(https://grpc.io/docs/protoc-installation/)
- Node.js >=12.19.0
1.脚本获取二进制文件(*)
curl https://get.starport.network/starport! | bash
2.macOS with Homebrew
brew install tendermint/tap/starport
3.Build from source
git clone https://github.com/tendermint/starport && cd starport && make
This will build and install starport
binary into $GOBIN
.
快速启动
starport app github.com/foo/mychain
cd mychain
starport serve
遇见的问题
需要将packr2命令放在全局中
Go 1.14版本编译出现问题 需要1.15+版本
ubuntu环境安装 Protocol Buffer compiler 出现问题
protoc-gen-gocosmos无法找到
sudo apt install -y protobuf-compiler
尝试使用 go get进行安装
go get -u github.com/golang/protobuf/{proto,protoc-gen-go}