问题
安装包时,通过go get下载并安装gin软件包报错,提示unrecognized import path “golang.org/x/crypto/sha3”: https fetch: Get……
解决
出现这种问题是网速问题,网上有很多解决方法,其中比较常见的就是在 github 上建立了一个镜像库,下载github上的镜像库放入GOPATH下即可
mkdir -p $GOPATH/src/golang.org/x //-p层级递归创建
cd $GOPATH/src/golang.org/x
git clone https://github.com/golang/sync.git
git clone https://github.com/golang/crypto.git
git clone https://github.com/golang/sys.git
解决Go安装gin包时golang.org/x/crypto/sha3导入失败的问题
当通过goget安装gin时遇到golang.org/x/crypto/sha3导入路径错误,通常是由于网络问题导致。解决方法包括在GitHub上手动克隆相关库到GOPATH下,例如:同步golang.org/x/sync、crypto和sys的源代码到本地。具体步骤为创建目录,然后分别使用git clone命令克隆这3个库。
768

被折叠的 条评论
为什么被折叠?



