root@KC:~# cd go-ethereum
root@KC:~/go-ethereum# make geth
build/env.sh go run build/ci.go install ./cmd/geth
internal/build/azure.go:20:2: cannot find package "context" in any of:
/root/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/vendor/context (vendor tree)
/usr/lib/go-1.6/src/context (from $GOROOT)
/root/go-ethereum/build/_workspace/src/context (from $GOPATH)
Makefile:15: recipe for target 'geth' failed
make: *** [geth] Error 1
解决办法:
sudo apt-get remove golang
sudo apt-get install go-1.9
sudo cp /usr/lib/go-1.9/bin/go /usr/bin/go
root@KC:~/go-ethereum# make geth
build/env.sh go run build/ci.go install ./cmd/geth
internal/build/azure.go:20:2: cannot find package "context" in any of:
/root/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/vendor/context (vendor tree)
/usr/lib/go-1.6/src/context (from $GOROOT)
/root/go-ethereum/build/_workspace/src/context (from $GOPATH)
Makefile:15: recipe for target 'geth' failed
make: *** [geth] Error 1
解决办法:
sudo apt-get remove golang
sudo apt-get install go-1.9
sudo cp /usr/lib/go-1.9/bin/go /usr/bin/go
40451