MSYS2 配置

MSYS2

下载安装

下载地址:https://www.msys2.org/

配置

添加国内软件源

打开/etc/pacman.d找到mirrorlist的三个文件

  1. 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/
  1. 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/
Server = http://mirror.bit.edu.cn/msys2/REPOS/
  1. 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/

更新pacman和pacman key

  1. 下载最新Key文件: curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
  2. 下载效验文件: curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
  3. 文件效验: pacman-key --verify msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig

如果无法通过pacman安装,可以本地安装软件包

pacman -U --config <(echo) msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz

上一篇:windows git 的扩展用法——其他linux命令


下一篇:mingw 或 msys2 用 gcc 编译 lua