报错
@-UIS-Cell-3010-G3:~/ewasm/go-ethereum$ make geth
build/env.sh go run build/ci.go install ./cmd/geth
build/env.sh: line 30: exec: go: not found
Makefile:15: recipe for target 'geth' failed
make: *** [geth] Error 127
原文地址 https://www.b2bchain.cn/5498.html
安装go
geth依赖golang(版本不能低于1.7),
下载:https://golang.org/dl/
本文下载的是go1.10.3.liunx-amd64.tar.gz
下载后,解压到/usr/local/目录
tar -C /usr/local/ -xvf go1.10.3.linux-amd64.tar.gz
添加环境变量:
vi /etc/profile
在打开的文件profile中追加内容:
#golang
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
export GOARCH=amd64 # 注意这个坑
执行命令,使profile生效:
执行命令,使profile生效:
> source
/etc
/profile
golang安装部署完成,测试:
> go version
go version go1
.10.3 linux
/amd64
编译geth
克隆 git clone git@github.com:codelzl/go-ethereum.git
编译 make geth 调用go语言编译器
启动 ./build/bin/geth
参考https://blog.csdn.net/apple9005/article/details/81045933