更新 yay 时出现以下错误:

$ yay -S yay
==> Starting build()...
go build -trimpath -mod=readonly -modcacherw -ldflags '-X "main.yayVersion=12.4.2" -X "main.localePath=/usr/share/locale/" -linkmode=external -compressdwarf=false' -buildmode=pie -o yay
go: downloading github.com/Jguer/go-alpm/v2 v2.2.2
go: downloading github.com/Jguer/aur v1.2.3
go: downloading github.com/Jguer/votar v1.0.0
go: downloading github.com/deckarep/golang-set/v2 v2.6.0
go: downloading github.com/Morganamilo/go-srcinfo v1.0.0
go: downloading github.com/leonelquinteros/gotext v1.5.2
go: downloading golang.org/x/sys v0.18.0
go: downloading github.com/Morganamilo/go-pacmanconf v0.0.0-20210502114700-cff030e927a5
go: downloading github.com/adrg/strutil v0.3.1
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading golang.org/x/term v0.18.0
clean.go:8:2: github.com/Jguer/[email protected]: Get "https://proxy.golang.org/github.com/%21jguer/aur/@v/v1.2.3.zip": dial tcp 142.250.217.81:443: i/o timeout
cmd.go:11:2: github.com/Jguer/go-alpm/[email protected]: Get "https://proxy.golang.org/github.com/%21jguer/go-alpm/v2/@v/v2.2.2.zip": dial tcp 142.250.217.81:443: i/o timeout
vote.go:8:2: github.com/Jguer/[email protected]: Get "https://proxy.golang.org/github.com/%21jguer/votar/@v/v1.0.0.zip": dial tcp 142.250.217.81:443: i/o timeout
pkg/text/errors.go:3:8: github.com/leonelquinteros/[email protected]: Get "https://proxy.golang.org/github.com/leonelquinteros/gotext/@v/v1.5.2.zip": dial tcp 142.250.217.81:443: i/o timeout
pkg/db/ialpm/alpm.go:11:2: github.com/Morganamilo/[email protected]: Get "https://proxy.golang.org/github.com/%21morganamilo/go-pacmanconf/@v/v0.0.0-20210502114700-cff030e927a5.zip": dial tcp 142.250.217.81:443: i/o timeout
pkg/intrange/intrange.go:8:2: github.com/deckarep/golang-set/[email protected]: Get "https://proxy.golang.org/github.com/deckarep/golang-set/v2/@v/v2.6.0.zip": dial tcp 142.250.217.81:443: i/o timeout
pkg/query/metric.go:7:2: github.com/adrg/[email protected]: Get "https://proxy.golang.org/github.com/adrg/strutil/@v/v0.3.1.zip": dial tcp 142.250.217.81:443: i/o timeout
pkg/query/query_builder.go:13:2: github.com/adrg/[email protected]: Get "https://proxy.golang.org/github.com/adrg/strutil/@v/v0.3.1.zip": dial tcp 142.250.217.81:443: i/o timeout
pkg/query/source.go:7:2: github.com/hashicorp/[email protected]: Get "https://proxy.golang.org/github.com/hashicorp/go-multierror/@v/v1.1.1.zip": dial tcp 142.250.217.81:443: i/o timeout
pkg/dep/dep_graph.go:10:2: github.com/Morganamilo/[email protected]: Get "https://proxy.golang.org/github.com/%21morganamilo/go-srcinfo/@v/v1.0.0.zip": dial tcp 142.250.217.81:443: i/o timeout
pkg/runtime/runtime.go:20:2: github.com/Jguer/[email protected]: Get "https://proxy.golang.org/github.com/%21jguer/aur/@v/v1.2.3.zip": dial tcp 142.250.217.81:443: i/o timeout
pkg/runtime/runtime.go:21:2: github.com/Jguer/[email protected]: Get "https://proxy.golang.org/github.com/%21jguer/aur/@v/v1.2.3.zip": dial tcp 142.250.217.81:443: i/o timeout
pkg/runtime/pacman.go:10:2: golang.org/x/[email protected]: Get "https://proxy.golang.org/golang.org/x/term/@v/v0.18.0.zip": dial tcp 142.250.217.81:443: i/o timeout
print.go:16:2: golang.org/x/[email protected]: Get "https://proxy.golang.org/golang.org/x/sys/@v/v0.18.0.zip": dial tcp 142.250.217.81:443: i/o timeout
make: *** [Makefile:114: yay] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: yay-exit status 4

设置环境为国内代理:

$ GOPROXY="direct" yay -S yay