用MSYS2 pacman -S 安装包的速度让你怀疑人生。 所以需要将源换成国内源:
步骤:
<1> 打开MSYS2软件内的\etc\pacman.d\ 其中有3个文件:
mirrorlist.mingw32 mirrorlist.mingw64 mirrorlist.msys
<2> 用编辑器打开这3个文件,加入国内的源:
最上边,会优先进行访问
#号代表注释
修改后的 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/
修改后的 mirrorlist.mingw64 :
#