go: golang.org/x/[email protected]: unrecognized import path "golang.orgnrecognized import path "golang.org/x/sys" (https fetch: G1: dial tcp 216.239.37.1:443: conneet https://golang.org/x/sys?go-get=1: dial tcp 216.239.37.rty did not properly respond after1:443: connectex: A connection attempt failed because the connected host has failed to respoconnected party did not properly respond after a period of time, or established connection failed because connected : unrecognized import path "golang.host has failed to respond.)
...
go: golang.org/x/[email protected] party did not properly respo: unrecognized import path "golang.org/x/crypto" (https fed because connected host has failedtch: Get https://golang.org/x/crypto?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a
period of time, or established connection failed because connected host has failed to respond.)
go: error loading module requirements
如上,不能安裝sys和crypto這兩個庫,用如下方式即可
1手動加入被牆的包(原始包),一定要記住版本號,實在不知道的話,就試試v0.0.0;
$ go mod edit -require=golang.org/x/[email protected]
2 用github上的鏡像地址替換
$ go mod edit -replace=golang.org/x/[email protected]=github.com/golang/crypto@latest
$ go mod edit -replace=golang.org/x/[email protected]=github.com/golang/sys@latest