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

你可能感兴趣的:(linux,小妙招)