【go】报错整理与解决

文章目录

    • 依赖下载失败checksum mismatch
    • 启动报错missing go.sum

依赖下载失败checksum mismatch

> go get github.com/hibiken/asynqmon
go: downloading github.com/hibiken/asynqmon v0.7.2
go: github.com/hibiken/[email protected]: verifying module: checksum mismatch
        downloaded: h1:EfLRppj5GlklMPzdCjdonpXz/D23meW0Pk6NAtkOPhw=
        sum.golang.org: h1:YohWgTIPwtMyZ6khBDcVUz9BdSdQW2Dxn8SoxtbmjSg=

SECURITY ERROR
This download does NOT match the one reported by the checksum server.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

For more information, see 'go help module-auth'.

解决:设置七牛云代理
【go】报错整理与解决_第1张图片
GOPROXY=https://goproxy.cn,direct
注意:别的代理会验证失败!

启动报错missing go.sum

go run 启动报错
【go】报错整理与解决_第2张图片
解决:go mod tidy重新整理依赖

你可能感兴趣的:(go,golang,开发语言,后端)