当前位置: 首页 > 工具软件 > X.Org > 使用案例 >

golang unrecognized import path "golang.org/x/crypto"

段良弼
2023-12-01

golang unrecognized import path "golang.org/x/crypto"的解决方法

用代理还是靠谱些

[root@test rttys]# export GOPROXY=https://goproxy.io
[root@test rttys]# export GO111MODULE=on
[root@test rttys]# go get
go: downloading golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4
go: extracting golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4
go: finding github.com/dwdcth/consoleEx v0.0.0-20180521133551-f56f6eb78b76
go: finding github.com/gorilla/websocket v1.4.1
go: finding github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c
go: finding github.com/json-iterator/go v1.1.9
go: finding github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28
go: finding github.com/mattn/go-colorable v0.1.4
go: finding github.com/rakyll/statik v0.1.7
go: finding golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4
go: finding github.com/rs/zerolog v1.18.0
go: finding github.com/mattn/go-isatty v0.0.8
go: finding golang.org/x/sys v0.0.0-20190412213103-97732733099d
go: finding github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421
go: finding github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742

附上Go.mod的格式

[root@test rttys]# cat go.mod
module github.com/zhaojh329/rttys

go 1.14

require (
        github.com/dwdcth/consoleEx v0.0.0-20180521133551-f56f6eb78b76
        github.com/gorilla/websocket v1.4.1
        github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c
        github.com/json-iterator/go v1.1.9
        github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28
        github.com/mattn/go-colorable v0.1.4
        github.com/rakyll/statik v0.1.7
        github.com/rs/zerolog v1.18.0
        golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4
)

 

 类似资料: