当前位置:网站首页>Golang sets the small details of goproxy proxy proxy, which is applicable to go module download timeout and Alibaba cloud image go module download timeout
Golang sets the small details of goproxy proxy proxy, which is applicable to go module download timeout and Alibaba cloud image go module download timeout
2022-07-04 12:54:00 【Late night watch listening】
problem
A few days ago, I was curious to add an official community group of domestic alliance chain blockchain , Then someone compiles a tool go module Download has timed out , Then I used Alibaba cloud's image , The command looks ok as follows , But still timeout .
verification
But I clean up here module cache , Verify that the Alibaba cloud image is indeed hung , But it is normal to change other mirror agents , That's ridiculous .
Analyze the causes and solutions
Then the reason must be the configuration problem , So I checked the man's bash command , There is a problem , as follows :
Be reasonable export The command is always valid when the terminal is not turned off , But he has another detail here. I don't know if you have found it , He abused it sudo command , He compiled the command with sudo make
, however root What the user is looking for golang Environment variables have not been modified , So the last one export
The command is input in vain .
It's also easy to solve , Directly use the following command to modify go env environment variable
go env -w GO111MODULE=on #-w Indicates to modify the default value of the environment variable
go env -w GOPROXY=https://goproxy.io,direct
Use... After modification go env
Check whether the order has been changed , Last make
Get it done .
I have to say that it's really cool to pretend to be forced :)
🥰 If you like, you can also buy me juice 🥰
Reward / Donate
边栏推荐
- Article download address
- Show recent errors only command /bin/sh failed with exit code 1
- WPF双滑块控件以及强制捕获鼠标事件焦点
- mm_ Cognition of struct structure
- C語言函數
- Peak detection of measured signal
- Kivy tutorial 08 countdown app implements timer call (tutorial includes source code)
- CA:用于移动端的高效坐标注意力机制 | CVPR 2021
- 【FAQ】华为帐号服务报错 907135701的常见原因总结和解决方法
- Alibaba cloud award winning experience: build a highly available system with polardb-x
猜你喜欢
Fastlane 一键打包/发布APP - 使用记录及踩坑
ArcGis利用栅格处理工具进行影像裁剪
DC-5靶机
R语言--readr包读写数据
Interviewer: what is the difference between redis expiration deletion strategy and memory obsolescence strategy?
golang 设置goproxy代理的小细节,适用于go module下载超时,阿里云镜像go module下载超时
Fastlane one click package / release app - usage record and stepping on pit
众昂矿业:为保障萤石足量供应,开源节流势在必行
runc hang 导致 Kubernetes 节点 NotReady
Read the BGP agreement in 6 minutes.
随机推荐
CANN算子:利用迭代器高效实现Tensor数据切割分块处理
AI painting minimalist tutorial
runc hang 导致 Kubernetes 节点 NotReady
记一次 Showing Recent Errors Only Command /bin/sh failed with exit code 1 问题
Detailed explanation of mt4api documentary and foreign exchange API documentary interfaces
How to realize the function of Sub Ledger of applet?
Wechat video Number launches "creator traffic package"
C语言函数
Sort merge sort
Fastlane 一键打包/发布APP - 使用记录及踩坑
读《认知觉醒》
Global and Chinese markets of digital PCR and real-time PCR 2022-2028: Research Report on technology, participants, trends, market size and share
A treasure open source software, cross platform terminal artifact tabby
Global and Chinese market for naval vessel maintenance 2022-2028: Research Report on technology, participants, trends, market size and share
Will the concept of "being integrated" become a new inflection point of the information and innovation industry?
数据库锁表?别慌,本文教你如何解决
6 分钟看完 BGP 协议。
When synchronized encounters this thing, there is a big hole, pay attention!
阿里云有奖体验:用PolarDB-X搭建一个高可用系统
Fastlane one click package / release app - usage record and stepping on pit