MSYS2中,/etc/pacman.conf
配置文件中关于仓库的配置如下:
[mingw32]
Include = /etc/pacman.d/mirrorlist.mingw32
[mingw64]
Include = /etc/pacman.d/mirrorlist.mingw64
[msys]
Include = /etc/pacman.d/mirrorlist.msys
从这里,我们可以知道:MSYS2有3个官方仓库,分别是mingw32
、mingw64
、msys
。
/etc/pacman.d/mirrorlist.mingw32
配置文件中的内容如下:
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/
Server = https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/
Server = http://mirrors.ustc.edu.cn/msys2/mingw/i686/
...
/etc/pacman.d/mirrorlist.mingw64
配置文件中的内容如下:
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/x86_64/
Server = https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/x86_64/
Server = http://mirrors.ustc.edu.cn/msys2/mingw/x86_64/
...
/etc/pacman.d/mirrorlist.msys
配置文件中的内容如下:
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/$arch/
Server = https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/$arch/
Server = http://mirrors.ustc.edu.cn/msys2/msys/$arch/
...
/etc/pacman.d/mirrorlist.xx
配置文件中越靠前的地址越优先被访问。将访问速度越快的地址排在前面是最好的策略。
仓库名称 | 软件名称前缀 | 软件安装位置 | 配置文件 |
---|---|---|---|
msys2 | /usr | /etc/pacman.d/mirrorlist.msys | |
mingw32 | mingw-w64-i686- | /mingw32 | /etc/pacman.d/mirrorlist.mingw32 |
mingw64 | mingw-w64-x86_64- | /mingw64 | /etc/pacman.d/mirrorlist.mingw64 |