当前位置:网站首页>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

边栏推荐
猜你喜欢

Master the use of auto analyze in data warehouse

昨天的事情想说一下

PostgreSQL 9.1 飞升之路

Show recent errors only command /bin/sh failed with exit code 1

洞见科技解决方案总监薛婧:联邦学习助力数据要素安全流通

Communication tutorial | overview of the first, second and third generation can bus

VIM, another program may be editing the same file If this is the solution of the case

C语言数组

Understand bloomfilter in one article

How to realize the function of Sub Ledger of applet?
随机推荐
Dry goods sorting! How about the development trend of ERP in the manufacturing industry? It's enough to read this article
Can Console. Clear be used to only clear a line instead of whole console?
Argminer: a pytorch package for processing, enhancing, training, and reasoning argument mining datasets
C#/VB.NET 给PDF文档添加文本/图像水印
Transformer principle and code elaboration (pytorch)
Detailed explanation of mt4api documentary and foreign exchange API documentary interfaces
Building intelligent gray-scale data system from 0 to 1: Taking vivo game center as an example
AI painting minimalist tutorial
Fastlane 一键打包/发布APP - 使用记录及踩坑
使用 NSProxy 实现消息转发
When to use pointers in go?
PostgreSQL 9.1 飞升之路
Play Sanzi chess easily
Entity framework calls Max on null on records - Entity Framework calling Max on null on records
AI 绘画极简教程
Alibaba cloud award winning experience: build a highly available system with polardb-x
6 分钟看完 BGP 协议。
I want to talk about yesterday
Two dimensional code coding theory
轻松玩转三子棋