1.安装go
wget https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz
tar -C /usr/local -zxvf go1.13.4.linux-amd64.tar.gz
vim /etc/profile
export GOPATH='/home/gopath' #即你的go项目目录下
export PATH="GOPATH/bin"
export GOROOT=/usr/local/go
export PATH=$PATH:/usr/local/go/bin
source /etc/profile
mkdir $HOME/gopath
go version
2.安装 rust
curl https://sh.rustup.rs -sSf | sh
apt install rustc
3.安装gx
go get -u github.com/whyrusleeping/gx
要进入
cd /home/gopath/src/github.com/urfave/cli/
urfave go build 一下
再 go get -u github.com/whyrusleeping/gx
4.安装jq
apt install jq
sudo apt install golang-go gcc git bzr jq pkg-config mesa-opencl-icd ocl-icd-opencl-dev
5.下载项目
mkdir -p {GOPATH}/src/github.com/filecoin-project/go-filecoin
6.拉依赖
cd ${GOPATH}/src/github.com/filecoin-project/go-filecoin
git submodule update --init --recursive
7.build
FILECOIN_USE_PRECOMPILED_RUST_PROOFS=true go run ./build deps
8.构建release包
go run ./build build
安装go-filecoin至${GOPATH}/bin目录下
go run ./build/*.go install
单元测试
go run ./build/*.go test
9.go-filecoin 出现如下图菜单栏,说明节点已经成功安装。