<分区>
我正在尝试在我的 Windows 机器上运行 go-ethereum@v1.0.0。
我的工作:
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 .
希望go mod可以帮我安装所有模块,但是遇到错误:
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)
我认为那是因为 cmd/geth 存在于 $GOPATH 和 $PWD 中。怎么解决才能运行成功?
PS: 我希望它使用 $PWD 以便我可以更改它。