为什么我在尝试构建任何 Go 程序时会收到重新声明的错误?

我想学围棋。我在 64 位 Windows 10 上安装了 Go 1.13.5。我开始尝试构建以下 hello world 程序:


package hello


import ("fmt")


func main() {

    fmt.Printf("Hello world!")


}

但是,当我尝试构建它或任何其他 Go 程序时,我收到错误


c:\go\src\runtime\stubs_x86.go:10:6: stackcheck redeclared in this block

        previous declaration at c:\go\src\runtime\stubs_amd64x.go:10:6

c:\go\src\runtime\unaligned1.go:11:6: readUnaligned32 redeclared in this block

        previous declaration at c:\go\src\runtime\alg.go:321:40

c:\go\src\runtime\unaligned1.go:15:6: readUnaligned64 redeclared in this block

        previous declaration at c:\go\src\runtime\alg.go:329:40

有谁知道出了什么问题?


白衣染霜花
浏览 74回答 1
1回答

慕容708150

这似乎是 Go v1.13 的常见问题。您可以尝试完全卸载并重新安装。
打开App,查看更多内容
随时随地看视频慕课网APP