1. 首页
  2. 主题
  3. Go问与答

求教

AnstOu · · 1989 次点击
初次学习golang 运行时一直包一下错误 ``` # runtime D:\Go\src\runtime\map.go:64:2: bucketCntBits redeclared in this block previous declaration at D:\Go\src\runtime\hashmap.go:64:18 D:\Go\src\runtime\map.go:65:2: bucketCnt redeclared in this block previous declaration at D:\Go\src\runtime\hashmap.go:65:23 D:\Go\src\runtime\map.go:69:2: loadFactorNum redeclared in this block previous declaration at D:\Go\src\runtime\hashmap.go:69:18 D:\Go\src\runtime\map.go:70:2: loadFactorDen redeclared in this block previous declaration at D:\Go\src\runtime\hashmap.go:70:18 D:\Go\src\runtime\map.go:76:2: maxKeySize redeclared in this block previous declaration at D:\Go\src\runtime\hashmap.go:76:17 D:\Go\src\runtime\map.go:77:2: maxValueSize redeclared in this block previous declaration at D:\Go\src\runtime\hashmap.go:77:17 D:\Go\src\runtime\map.go:82:2: dataOffset redeclared in this block previous declaration at D:\Go\src\runtime\hashmap.go:85:4 D:\Go\src\runtime\map.go:91:2: empty redeclared in this block previous declaration at D:\Go\src\runtime\hashmap.go:91:19 D:\Go\src\runtime\map.go:92:2: evacuatedEmpty redeclared in this block previous declaration at D:\Go\src\runtime\hashmap.go:92:19 D:\Go\src\runtime\map.go:93:2: evacuatedX redeclared in this block previous declaration at D:\Go\src\runtime\hashmap.go:93:19 D:\Go\src\runtime\map.go:93:2: too many errors ``` 以下是运行代码 ```go package main import ( "fmt" ) func main() { fmt.Println("Hello World!") } ``` 版本是 go version go1.11 windows/amd64
<a href="/user/AnstOu" title="@AnstOu">@AnstOu</a> 方式一: 是不是真的如7楼说的多版本问题?卸载干净? go env 可以看到当前使用版本的信息 方式二:通过源码的方式安装试下
#8
更多评论
xmge
欲戴王冠 必承其重
https://studygolang.com/articles/3880
#1
安装的问题吧,你的runtime 都跑到GOPATH ?src下去了?
#2

用户登录

没有账号?注册

今日阅读排行

    加载中

一周阅读排行

    加载中