文件和文件夹命名不要有空格!!!!!
MSys2能在windows上创建一个Linux环境。
MSys2
开源镜像站-中国科技大学
Index of /msys2/distrib/x86_64/
软件包管理器:pacman
pacman -S gcc
pacman -Ss gcc
选择 mingw-w64-x86_64-gcc
pacman -S mingw-w64-x86_64-gcc
错误:无法从 repo.msys2.org : transfer closed with 94852 bytes remaining to read 获取文件 'mingw-w64-x86_64-gcc-libs-8.2.1+20181207-1-any.pkg.tar.xz'
更换国内源(中科大):
简单的说 msys64\etc\pacman.d 目录下有三个文件。
mirrorlist.msys
mirrorlist.mingw64
mirrorlist.mingw32
这三个文件记录了都有哪些源。下面把我添加之后的文件内容贴上来。
首先是 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/
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/
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/