3.2 windows + msys2

对于msys2这款软件已经从陌生到熟悉了,从安装时,各种bug,安装失败,到如今的畅通之道。
MSYS2 (Minimal SYStem 2) 是一个MSYS的独立改写版本,主要用于 shell 命令行开发环境。同时它也是一个在Cygwin (POSIX 兼容性层) 和 MinGW-w64(从”MinGW-生成”)基础上产生的,追求更好的互操作性的 Windows 软件。
官网 http://www.msys2.org/
3.2 windows + msys2
下载安装:
3.2 windows + msys2
3.2 windows + msys2
3.2 windows + msys2
3.2 windows + msys2

启动安装报错之类的错误,其实都有解决之道的,比如下面的错误,只要按照我的步骤走,绝对的可以畅通无比

错误:GPGME error: Invalid crypto engine
错误:GPGME error: Invalid crypto engine
错误:GPGME error: Invalid crypto engine
错误:「mingw32」数据库不正确 (数据库不正确或损毁 (PGP 签名))
错误:「mingw64」数据库不正确 (数据库不正确或损毁 (PGP 签名))
错误:「msys」数据库不正确 (数据库不正确或损毁 (PGP 签名))
按照 C:\msys64\etc\pacman.conf 第45至47行的描述
# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

备用:
若你在换源之后,更新了软件包,有可能需要关闭 msys2 然后再重新运行如下两个批处理文件:
autorebase.bat
msys2_shell.bat

第一步:打开

3.2 windows + msys2
输入命令
pacman-key --init
3.2 windows + msys2

第二步换源

换掉 C:\msys64\etc\pacman.d\ 的 mirrorlist.mingw32, mirrorlist.mingw64 和 mirrorlist.msys 里的默认源,改为以下源或者直接替换掉文件夹即可
修改完之后,把此文件夹备份一份,一会或者以后也要使用
3.2 windows + msys2

## 32-bit Mingw-w64 repository mirrorlist
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/
#Server = https://mirrors.ustc.edu.cn/msys2/mingw/i686/
#Server = https://mirrors.xjtu.edu.cn/msys2/mingw/i686/

## 64-bit Mingw-w64 repository mirrorlist
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/x86_64/
#Server = https://mirrors.ustc.edu.cn/msys2/mingw/x86_64/
#Server = https://mirrors.xjtu.edu.cn/msys2/mingw/x86_64/

## MSYS2 repository mirrorlist
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/$arch
#Server = https://mirrors.ustc.edu.cn/msys2/REPOS/MSYS2/$arch
#Server = https://mirrors.xjtu.edu.cn/msys2/msys/$arch

以下命令说明

pacman -Syu                      #同步源,并更新系统 
pacman -Sy                        #仅同步源 
pacman -Su                        #更新系统

第三步 同步源,并更新系统

pacman -Syu
3.2 windows + msys2
3.2 windows + msys2
3.2 windows + msys2
看到此字样时,ctrl+c关闭
可以查阅了解具体信息https://wiki.gimp.org/wiki/Hacking:Building/Windows
翻译:
如果抛出一个错误关于incompatible versions of the cygwin DLL和下面的警告显示:
警告:终止msys2没有回到壳并检查更新againwarning:例如关闭您的终端窗口不说出
然后按照指示关闭终端窗口(可以提醒你正在运行的进程,选择“确定”关闭该窗口)。
重新打开msys2从安装目录运行msys2_shell.cmd,并重新执行更新命令pacman - Syu
如果需要,关闭msys2再次运行它(再次)。
最后剩下的更新与一个电话:
pacman -Su
一旦一切都更新,退出msys2。

第四步 替换源

然后关闭掉终端,重新替换源(把之前备份的,再替换过去)

第五步更新系统

运行 msys2_shell.cmd
pacman -Syu
3.2 windows + msys2
3.2 windows + msys2

第六步 安装软件

pacman -S man gcc mingw-w64-x86_64-toolchain base-devel git tar perl make openssl
3.2 windows + msys2
3.2 windows + msys2

第七步配置环境

需要重启cmd命令行才能够验证输入命令

注意这两个可能顺序不同,造成你的输入命令就无法执行,请注意这种情况

3.2 windows + msys2

相关文章:

  • 2022-02-24
  • 2021-08-09
  • 2021-12-27
  • 2021-06-01
  • 2021-12-27
  • 2022-02-14
  • 2022-12-23
  • 2021-07-09
猜你喜欢
  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-11
相关资源
相似解决方案