I'm trying to run go-ethereum@v1.0.0 on my windows machine.
What I do:
cd G:\go
git clone https://github.com/ethereum/go-ethereum.git
cd go-ethereum/cmd/geth
git checkout tags/v1.0.0 -b v1.0.0
go mod init github.com/ethereum/go-ethereum/cmd/geth
go run .
I hope go mod can help me install all modules, but meet an error:
package github.com/ethereum/go-ethereum/cmd/geth: unknown import path "github.com/ethereum/go-ethereum/cmd/geth": ambiguous import: found github.com/ethereum/go-ethereum/cmd/geth in multiple modules:
github.com/ethereum/go-ethereum/cmd/geth (G:\go\go-ethereum\cmd\geth)
github.com/ethereum/go-ethereum v1.8.23 (G:\GOPATH\pkg\mod\github.com\ethereum\go-ethereum@v1.8.23\cmd\geth)
I think that's because the cmd/geth exists in $GOPATH and $PWD both. How can I solve this can run successfully?
PS: I hope it use $PWD so that I can change it.
If you want to geth, do this. I did this.
cd $GOPATH/src
git clone https://github.com/ethereum/go-ethereum.git
cd $GOPATH/src/github.com/ethereum/go-ethereum
git checkout tags/v1.0.0 -b v1.0.0
go install github.com/ethereum/go-ethereum/cmd/geth
ls $GOPATH/bin/geth