GO 問題之多版本衝突解決

taozywu發表於2019-07-24

場景

/usr/local/go/src/runtime/map.go:65:2: bucketCntBits redeclared in this block
previous declaration at /usr/local/go/src/runtime/hashmap.go:64:18
/usr/local/go/src/runtime/map.go:66:2: bucketCnt redeclared in this block
previous declaration at /usr/local/go/src/runtime/hashmap.go:65:23
/usr/local/go/src/runtime/map.go:70:2: loadFactorNum redeclared in this block
previous declaration at /usr/local/go/src/runtime/hashmap.go:69:18
/usr/local/go/src/runtime/map.go:71:2: loadFactorDen redeclared in this block
previous declaration at /usr/local/go/src/runtime/hashmap.go:70:18
/usr/local/go/src/runtime/map.go:77:2: maxKeySize redeclared in this block
previous declaration at /usr/local/go/src/runtime/hashmap.go:76:17
/usr/local/go/src/runtime/map.go:78:2: maxValueSize redeclared in this block
previous declaration at /usr/local/go/src/runtime/hashmap.go:77:17
/usr/local/go/src/runtime/map.go:83:2: dataOffset redeclared in this bloc
previous declaration at /usr/local/go/src/runtime/hashmap.go:85:4
/usr/local/go/src/runtime/map.go:94:2: evacuatedX redeclared in this block
previous declaration at /usr/local/go/src/runtime/hashmap.go:93:19
/usr/local/go/src/runtime/map.go:95:2: evacuatedY redeclared in this block
previous declaration at /usr/local/go/src/runtime/hashmap.go:94:19
/usr/local/go/src/runtime/map.go:96:2: evacuatedEmpty redeclared in this block
previous declaration at /usr/local/go/src/runtime/hashmap.go:92:19
/usr/local/go/src/runtime/map.go:96:2: too many errors

解決

go兩個版本衝突導致, 升級的時候建議先刪除舊版本後,再升級新版本。

本作品採用《CC 協議》,轉載必須註明作者和本文連結

相關文章