天天看点

windows系统go环境runtime/internal/atomic插件提示too many errors

文章目录

    • 问题描述
    • 问题原因
    • 解决方案

问题描述

GO111MODULE=on go get github.com/micro/cli/v2
go: github.com/micro/cli/v2 upgrade => v2.1.2
# runtime/internal/atomic
D:\install\go\src\runtime\internal\atomic\atomic_amd64x.go:13:6: Load redeclared in this block
        previous declaration at D:\install\go\src\runtime\internal\atomic\atomic_amd64.go:16:24
D:\install\go\src\runtime\internal\atomic\atomic_amd64x.go:19:6: Loadp redeclared in this block
        previous declaration at D:\install\go\src\runtime\internal\atomic\atomic_amd64.go:22:32
D:\install\go\src\runtime\internal\atomic\atomic_amd64x.go:25:6: Load64 redeclared in this block
        previous declaration at D:\install\go\src\runtime\internal\atomic\atomic_amd64.go:28:26
D:\install\go\src\runtime\internal\atomic\atomic_amd64x.go:30:6: Xadd redeclared in this block
        previous declaration at D:\install\go\src\runtime\internal\atomic\atomic_amd64.go:39:37
D:\install\go\src\runtime\internal\atomic\atomic_amd64x.go:33:6: Xadd64 redeclared in this block
        previous declaration at D:\install\go\src\runtime\internal\atomic\atomic_amd64.go:42:39
D:\install\go\src\runtime\internal\atomic\atomic_amd64x.go:36:6: Xadduintptr redeclared in this block
        previous declaration at D:\install\go\src\runtime\internal\atomic\atomic_amd64.go:45:47
D:\install\go\src\runtime\internal\atomic\atomic_amd64x.go:39:6: Xchg redeclared in this block
        previous declaration at D:\install\go\src\runtime\internal\atomic\atomic_amd64.go:48:36
D:\install\go\src\runtime\internal\atomic\atomic_amd64x.go:42:6: Xchg64 redeclared in this block
        previous declaration at D:\install\go\src\runtime\internal\atomic\atomic_amd64.go:51:38
D:\install\go\src\runtime\internal\atomic\atomic_amd64x.go:45:6: Xchguintptr redeclared in this block
        previous declaration at D:\install\go\src\runtime\internal\atomic\atomic_amd64.go:54:45
D:\install\go\src\runtime\internal\atomic\atomic_amd64x.go:48:6: And8 redeclared in this block
        previous declaration at D:\install\go\src\runtime\internal\atomic\atomic_amd64.go:63:27
D:\install\go\src\runtime\internal\atomic\atomic_amd64x.go:48:6: too many errors
           

问题原因

可能是升级(覆盖安装)go版本导致。

解决方案

删除go安装文件夹并重装go。

*******************

只要思想不滑坡,办法总比困难多

*******************

继续阅读