博客转载自:https://blog.csdn.net/puputaoexin/article/details/81780492
在使用msys2下载文件的时候回出现下载速度奇慢,且经常因为各种原因报错,提示从repo.msys2.org/中获取失败,这是由于GFW作怪,访问SF的源并不稳定导致的,安装文件获取路径改为其他镜像即可。
修改msys64\etc\pacman.d 目录下有三个文件的内容:mirrorlist.mingw32 、mirrorlist.mingw64 、mirrorlist.msys为中国科学技术大学开源软件镜像
- mirrorlist.mingw32
## ## 32-bit Mingw-w64 repository mirrorlist ## ## Primary ## msys2.org Server = http://mirrors.ustc.edu.cn/msys2/mingw/i686/ Server = http://repo.msys2.org/mingw/i686 Server = http://downloads.sourceforge.net/project/msys2/REPOS/MINGW/i686 Server = http://www2.futureware.at/~nickoe/msys2-mirror/i686/
- mirrorlist.mingw64
## ## 64-bit Mingw-w64 repository mirrorlist ## ## Primary ## msys2.org Server = http://mirrors.ustc.edu.cn/msys2/mingw/x86_64/ Server = http://repo.msys2.org/mingw/x86_64 Server = http://downloads.sourceforge.net/project/msys2/REPOS/MINGW/x86_64 Server = http://www2.futureware.at/~nickoe/msys2-mirror/x86_64/
- mirrorlist.msys
## ## MSYS2 repository mirrorlist ## ## Primary ## msys2.org Server = http://mirrors.ustc.edu.cn/msys2/msys/$arch/ Server = http://repo.msys2.org/msys/$arch Server = http://downloads.sourceforge.net/project/msys2/REPOS/MSYS2/$arch Server = http://www2.futureware.at/~nickoe/msys2-mirror/msys/$arch/
注意镜像Server = http://mirrors.ustc.edu.cn/msys2/mingw/i686/必须放在第一行,否则依旧从repo.msys2.org中获取 另外在配置环境变量的时候两个根目录的位置不能颠倒,不然会出错