Msys2的安装,并整合到cmder中

时间:2022-12-27 19:54:52

下载:msys2-x86_64-20161025.exe

下载安装包,然后装上。

打开msys的shell之后首先升级一下pacman,然后就可以愉快地Syu了。

$ pacman -Sy pacman
$ pacman -Syu

安装git,zsh,vim

$ pacman -S git zsh vim

把MSYS目录中的usr/bin加到环境变量里面去,在正常的cmd下面就也能跑其中的软件了。

添加MSYS2_ROOT环境变量,值为msys2安装位置

Msys2的安装,并整合到cmder中

 

修改Msys2镜像源:(msys2\etc\pacman.d路径)

##
## MSYS2 repository mirrorlist
##

## Primary
## msys2.org
Server = http://jaist.dl.sourceforge.net/project/msys2/REPOS/MSYS2/$arch
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/$arch
Server = http://sourceforge.mirrorservice.org/m/ms/msys2/REPOS/MSYS2/$arch
Server = http://mirror.bit.edu.cn/msys2/REPOS/MSYS2/$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/

32位:

Msys2的安装,并整合到cmder中Msys2的安装,并整合到cmder中
##
## 32-bit Mingw-w64 repository mirrorlist
##

## Primary
## msys2.org
Server = http://jaist.dl.sourceforge.net/project/msys2/REPOS/MINGW/i686
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686
Server = http://sourceforge.mirrorservice.org/m/ms/msys2/REPOS/MINGW/i686
Server = http://mirror.bit.edu.cn/msys2/REPOS/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/
View Code

64位:

Msys2的安装,并整合到cmder中Msys2的安装,并整合到cmder中
##
## 64-bit Mingw-w64 repository mirrorlist
##

## Primary
## msys2.org
Server = http://jaist.dl.sourceforge.net/project/msys2/REPOS/MINGW/x86_64
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/x86_64
Server = http://sourceforge.mirrorservice.org/m/ms/msys2/REPOS/MINGW/x86_64
Server = http://mirror.bit.edu.cn/msys2/REPOS/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/
View Code

 

整合cmder:

Msys2的安装,并整合到cmder中

Command:

set CHERE_INVOKING=1 & %MSYS2_ROOT%\usr\bin\bash.exe --login -i -new_console:C:"%MSYS2_ROOT%\msys2.ico"

 

 效果:

Msys2的安装,并整合到cmder中

 

 

http://www.jianshu.com/p/c740b71e7775

https://zyzyz.github.io/zh-cn/Integrate-MSYS2-into-Cmder/

http://blog.csdn.net/callinglove/article/details/48601775

https://mirrors.tuna.tsinghua.edu.cn/help/msys2/