- 到MSYS2官网 https://www.msys2.org/ 下载64位的MSYS2
- 安装.
-
pacman -Syuu
升级系统.最后卡住, 关闭掉重新打开 - 再次输入
pacman -Syuu
升级其他软件. -
pacman -S gcc openssh vim dos2unix perl ruby winpty cmake tar make git
安装一堆软件 - 参考下面关于
.bashrc
不运行的问题. - 参考下面关于解决
MSYS2 Here
右键菜单的问题 - 参考下面设置Anaconda, VS Code的问题
- 参考下面解决
Mintty python
的问题 - 参考下面解决git 提示的问题.
关于.bashrc
不运行的问题
很奇怪, 以前在Win7时没有遇到这个问题, 在Win10时运行MSYS2的时候就出现写在.bashrc
内的配置无法起效. 包括.profile
也没有被正确加载.
解决办法是在更优先级bash必定加载的/etc/bash.bashrc
中运行 .profile
(.profile
会自动运行.bashrc
).
notepad /etc/bash.bashrc
编辑 bash启动执行情况, 在最后加入 source ~/.profile
Reference: #97 64-bit msys2 is not running my .bashrc or .bash_profile.
解决MSYS2 Here 右键菜单的问题
新建一个txt文件, 显示后缀名, 将后缀名变为.reg
.确认更改后, 右键编辑, 写入以下内容 (我这里装在默认的c:/msys64
, 根据自己的情况去变更位置). 运行后确定. 即可加入右键菜单 MSYS2 Here
. (这里仅针对mingw64,mingw32类似处理, 没必要)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Classes\Directory\Background\shell\MINGW64 here]
"Icon"="C:\\msys64\\mingw64.exe"
[HKEY_LOCAL_MACHINE\Software\Classes\Directory\Background\shell\MINGW64 here\command]
@="C:\\msys64\\mingw64.exe bash"
[HKEY_LOCAL_MACHINE\Software\Classes\Directory\shell\MINGW64 here]
"Icon"="C:\\msys64\\mingw64.exe"
[HKEY_LOCAL_MACHINE\Software\Classes\Directory\shell\MINGW64 here\command]
@="C:\\msys64\\mingw64.exe bash"
[HKEY_LOCAL_MACHINE\Software\Classes\LibraryFolder\Background\shell\MINGW64 here]
"Icon"="C:\\msys64\\mingw64.exe"
[HKEY_LOCAL_MACHINE\Software\Classes\LibraryFolder\Background\shell\MINGW64 here\command]
@="C:\\msys64\\mingw64.exe bash"
网友评论