在centos下安装了go1.9.1版本,编译go-ethereum时报错:
[root@localhost go-ethereum]# make geth
build/env.sh go run build/ci.go install ./cmd/geth
>>> /usr/local/go/bin/go install -ldflags -X main.gitCommit=a095b84ec5a35cb3432380cc677d4e244b4a137f -v ./cmd/geth
github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
# github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
vendor/gopkg.in/olebedev/go-duktape.v3/duktape.go:133: constant 18446744073709551615 overflows int64
util.go:45: exit status 2
exit status 1
make: *** [geth] 错误 1
弄了很久,百度查了很多资料都没解决。在github上的网友说升到1.9.2版本的go能解决,验证后果然搞定了!
go1.9.2.linux-amd64.tar.gz官网下载地址:https://www.golangtc.com/download
安装go过程:
1. tar -xzf go1.9.2.linux-amd64.tar.gz -C /usr/local/
2. vim /etc/profile
export GOPATH=/usr/local/go
export PATH=$GOPATH/bin:$PATH
保存退出
source /etc/profile
3.验证:
go version
最后重新编译go-ethereum:
cd go-ethereum
make geth
搞定。