Golang镜像可能会有问题

  • Post author:
  • Post category:tech
  • Post comments:0 Comments

今天在开发Together后端的时候,安装golang 包的时出现“zip: not a valid zip file”

go install github.com/gohugoio/hugo@latest

go: downloading golang.org/x/exp v0.0.0-20221031165847-c99f073a8326
go: downloading gocloud.dev v0.34.0
go: downloading github.com/clbanning/mxj/v2 v2.7.0
go: downloading github.com/disintegration/gift v1.2.1
go: downloading golang.org/x/image v0.13.0
go: downloading cloud.google.com/go v0.110.7
go: downloading github.com/getkin/kin-openapi v0.120.0
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/parser/metadecoders/decoder.go:29:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/config/defaultConfigProvider.go:22:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/deploy/cloudfront.go:26:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/deploy/deploy.go:46:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/deploy/deploy_azure.go:21:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/deploy/deploy.go:47:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/deploy/deploy.go:48:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/deploy/deploy.go:49:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/deploy/deploy.go:50:2: zip: not a valid zip file
../../../.go/pkg/mod/google.golang.org/api@v0.138.0/internal/s2a.go:13:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/resources/images/config.go:30:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/muesli/smartcrop@v0.3.0/smartcrop.go:45:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/resources/images/image.go:36:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/resources/images/text.go:25:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/resources/images/text.go:26:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/resources/images/text.go:27:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/resources/images/text.go:28:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/resources/images/image.go:37:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/resources/image.go:49:2: zip: not a valid zip file
../../../.go/pkg/mod/github.com/gohugoio/hugo@v0.120.4/tpl/openapi/openapi3/openapi3.go:25:2: zip: not a valid zip file

后面折腾了半天,发现是阿里云的 golang 镜像有点问题,换成官方的就好了🤷‍♂️

Leave a Reply