MSYS2安装

1,安装环境

系统版本:Windows 10 专业版

系统类型:64位操作系统,基于x64的处理器

2,下载

http://www.msys2.org/首页,里面有下载链接和安装说明。

当前64位版本是msys2-x86_64-20180531.exe

直接点击msys2-x86_64-20180531.exe安装就行了,需要留意的是尽量不要安装在Program Files这种有空格的目录中。

3,修改镜像地址,加快安装工具时的下载速度:

(此处的根目录为MSYS2的安装目录)

扫描二维码关注公众号,回复: 4342269 查看本文章

在/etc/pacman.d/mirrorlist.mingw32中前面增加Server = http://mirrors.ustc.edu.cn/msys2/mingw/i686/

在/etc/pacman.d/mirrorlist.mingw64中前面增加Server = http://mirrors.ustc.edu.cn/msys2/mingw/x86_64/

在/etc/pacman.d/mirrorlist.msys中前面增加Server = http://mirrors.ustc.edu.cn/msys2/msys/$arch/

4,更新核心系统包

打开msys2_shell.cmd就可以启动了。

执行如下命令:

(Update the package database and core system packages with: )

pacman -Syu

当执行打印出如下警告信息后

警告:terminate MSYS2 without returning to shell and check for updates again

警告:for example close your terminal window instead of calling exit

关闭MSYS2终端,重新打开,再执行如下命令:

(If needed, close MSYS2, run it again from Start menu. Update the rest with: )

pacman -Su

5,安装gcc和make:

pacman -S gcc

pacman -S make

至此,MSYS2编译和运行环境都搭建好了。

6,参考文章

https://blog.csdn.net/linuxandroidwince/article/details/72388955

https://blog.csdn.net/qiuzhiqian1990/article/details/56671839

猜你喜欢

转载自blog.csdn.net/hanq4998/article/details/84747807