MSYS2添加国内源

步骤:
1、打开MSYS2软件内的\etc\pacman.d\ 中3个文件,分别进行修改

mirrorlist.mingw32   mirrorlist.mingw64  mirrorlist.msys 

2、用编辑器打开这3个文件,加入国内的源,会优先进行访问 # 号代表注释

  1. mirrorlist.mingw32:
##
## 32-bit Mingw-w64 repository mirrorlist
##

## Primary
## msys2.org 
##  清华大学
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686
## 中科大
Server = http://mirrors.ustc.edu.cn/msys2/mingw/i686
## 下边是源文件自带的源(国外)
Server = http://repo.msys2.org/mingw/i686/
Server = https://sourceforge.net/projects/msys2/files/REPOS/MINGW/i686/
Server = http://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/
Server = https://mirror.yandex.ru/mirrors/msys2/mingw/i686/
  1. mirrorlist.mingw64:
##
## 64-bit Mingw-w64 repository mirrorlist
##

## Primary
## msys2.org
## 清华大学
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/x86_64
## 中科大
Server = http://mirrors.ustc.edu.cn/msys2/mingw/x86_64
## 下边是原文件默认的源(国外)
Server = http://repo.msys2.org/mingw/x86_64/
Server = https://sourceforge.net/projects/msys2/files/REPOS/MINGW/x86_64/
Server = http://www2.futureware.at/~nickoe/msys2-mirror/mingw/x86_64/
Server = https://mirror.yandex.ru/mirrors/msys2/mingw/x86_64/
  1. mirrorlist.msys:
##
## MSYS2 repository mirrorlist
##

## Primary
## msys2.org
## 清华大学
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/$arch
## 中科大
Server = http://mirrors.ustc.edu.cn/msys2/msys/$arch
## 原文件自带的源(国外)
Server = http://repo.msys2.org/msys/$arch/
Server = https://sourceforge.net/projects/msys2/files/REPOS/MSYS2/$arch/
Server = http://www2.futureware.at/~nickoe/msys2-mirror/msys/$arch/
Server = https://mirror.yandex.ru/mirrors/msys2/msys/$arch/

注意事项:
3个文件都要修改。

3、安装常用工具

pacman -S  base-devel git wget perl ruby python3
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值