indes/flowerss-bot

编译报错:invalid version: git fetch --unshallow -f origin

ccinoo opened this issue · 3 comments

大佬,编译时如下报错,如何解决?

go mod download go: github.com/spf13/viper@v1.10.1 requires cloud.google.com/go@v0.99.0 requires cloud.google.com/go/storage@v1.10.0 requires cloud.google.com/go@v0.57.0 requires github.com/golang/protobuf@v1.4.0 requires google.golang.org/protobuf@v1.21.0 requires github.com/golang/protobuf@v1.4.0-rc.4.0.20200313231945-b860323f09d0: invalid version: git fetch --unshallow -f origin in /root/go/pkg/mod/cache/vcs/6e18cbff36266c74e48dd81b4b672026ac74fb69c838ddb6240f256bb8edf590: exit status 128: fatal: git fetch-pack: expected shallow list make: *** [get] Error 1

重新安装go环境和重新下载git包后,编译时报错如下:
[root@abcd flowerss-bot]# make build go mod download go: unknown subcommand "mod" Run 'go help' for usage. make: *** [get] Error 2

go环境升级到1.12.6后编译,报错如下:
`[root@abcd flowerss-bot]# make build
go mod download
go build -ldflags
"-X 'github.com/indes/flowerss-bot/config.commit=2b7cd67'
-X 'github.com/indes/flowerss-bot/config.date=Sun Mar 6 21:32:27 CST 2022'
-X 'github.com/indes/flowerss-bot/config.version=v0.8.4-48-g2b7cd67'" -o flowerss-bot

runtime

/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:77:2: maxKeySize redeclared in this block
previous declaration at /usr/local/go/src/runtime/hashmap.go:74: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:75:17
/usr/local/go/src/runtime/map.go:83:2: dataOffset redeclared in this block
previous declaration at /usr/local/go/src/runtime/hashmap.go:83: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:91: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:92: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:90:19
/usr/local/go/src/runtime/map.go:97:2: minTopHash redeclared in this block
previous declaration at /usr/local/go/src/runtime/hashmap.go:93:19
/usr/local/go/src/runtime/map.go:100:2: iterator redeclared in this block
previous declaration at /usr/local/go/src/runtime/hashmap.go:96:17
/usr/local/go/src/runtime/map.go:100:2: too many errors

crypto/rc4

/usr/local/go/src/crypto/rc4/rc4_asm.go:13:18: (*Cipher).XORKeyStream redeclared in this block
previous declaration at /usr/local/go/src/crypto/rc4/rc4.go:61:6
make: *** [build] Error 2`

indes commented

什么系统 ?go是什么版本?