描述
原先是1.17版本的go,我想升级到1.19,就直接覆盖安装了,控制台输出也没问题,真好啊
然后我就去测试了一下,编译直接报错
# runtime/internal/sys
F:\go\src\runtime\internal\sys\consts.go:13:7: StackGuardMultiplier redeclared in this block
F:\go\src\runtime\internal\sys\arch.go:27:7: other declaration of StackGuardMultiplier
F:\go\src\runtime\internal\sys\consts.go:16:7: DefaultPhysPageSize redeclared in this block
F:\go\src\runtime\internal\sys\arch.go:36:7: other declaration of DefaultPhysPageSize
F:\go\src\runtime\internal\sys\consts.go:20:7: PCQuantum redeclared in this block
F:\go\src\runtime\internal\sys\arch.go:40:7: other declaration of PCQuantum
F:\go\src\runtime\internal\sys\consts.go:23:7: Int64Align redeclared in this block
F:\go\src\runtime\internal\sys\arch.go:43:7: other declaration of Int64Align
F:\go\src\runtime\internal\sys\consts.go:30:7: MinFrameSize redeclared in this block
F:\go\src\runtime\internal\sys\arch.go:50:7: other declaration of MinFrameSize
F:\go\src\runtime\internal\sys\consts.go:34:7: StackAlign redeclared in this block
F:\go\src\runtime\internal\sys\arch.go:54:7: other declaration of StackAlign
解决办法
删除整个go的安装目录重新安装,解决
重新安装时候,最好先 remove一遍,然后再来一下