问题描述
尝试安装MSYS2 / MINGW时出现此错误:
>ridk install
1 - MSYS2 base installation
2 - MSYS2 system update
3 - MSYS2 and MINGW development toolchain
Which components shall be installed? If unsure press ENTER [1,2,3] 3
MSYS2 seems to be already installed
Install MSYS2 and MINGW development toolchain ...
> pacman -S --needed --noconfirm autoconf autoconf2.13 autogen automake-wrapper automake1.10 automake1.11 automake1.12 automake1.13 automake1.14 automake1.15 automake1.6 automake1.7 automake1.8 automake1.9 diffutils file gawk grep libtool m4 make patch pkg-config sed texinfo texinfo-tex wget mingw-w64-x86_64-binutils mingw-w64-x86_64-crt-git mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-headers-git mingw-w64-x86_64-libmangle-git mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-tools-git mingw-w64-x86_64-winpthreads-git
error: mingw32: signature from "David Macek <[email protected]>" is marginal trust
error: mingw64: signature from "David Macek <[email protected]>" is marginal trust
error: msys: signature from "David Macek <[email protected]>" is marginal trust
error: database 'mingw32' is not valid (invalid or corrupted database (PGP signature))
error: database 'mingw64' is not valid (invalid or corrupted database (PGP signature))
error: database 'msys' is not valid (invalid or corrupted database (PGP signature))
Install MSYS2 and MINGW development toolchain Failed
Installation Failed: pacman Failed
解决方法
显然ridk install
仅安装MSYS2 https://www.msys2.org/。他们切换了包装维护人员,因此密钥不正确:https://www.msys2.org/news/#2020-06-29-new-packagers。 Pacman是他们的包管理器(例如apt-get
,yum
,gem
)。我有一个旧版本,或者我的旧Ruby 2.4正在安装一个旧版本(版本:“ 20161025”)。我碰巧有Chocolatey,有一个msys2
包,所以我用
choco upgrade msys2 # this installed it. i did not have it installed via chocolatey
ridk version # still showed an old version and would not work
pacman -U xz # xz is like gzip - this gave the errors above
choco uninstall msys2 # this didn't do much
del \msys2 # have to manually delete the directory
choco upgrade msys2 # this installed a recent version
ridk install # have to install the make and c++ tools,so include choice 3
它安装了49个软件包,现在make
可以正常工作。