博客轉載自:https://blog.csdn.net/puputaoexin/article/details/81780492.net
在使用msys2下載文件的時候回出現下載速度奇慢,且常常由於各類緣由報錯,提示從repo.msys2.org/中獲取失敗,這是因爲GFW做怪,訪問SF的源並不穩定致使的,安裝文件獲取路徑改成其餘鏡像便可。
修改msys64\etc\pacman.d 目錄下有三個文件的內容:mirrorlist.mingw32 、mirrorlist.mingw64 、mirrorlist.msys爲中國科學技術大學開源軟件鏡像blog
## ## 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/
## ## 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/
## ## 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中獲取 另外在配置環境變量的時候兩個根目錄的位置不能顛倒,否則會出錯get