如何使用MSYS2获取旧版本的软件包? [英] How to obtain older versions of packages using MSYS2?

查看:1739
本文介绍了如何使用MSYS2获取旧版本的软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我决定尝试CLion for Windows,它推荐MinGW或Cygwin进行编译。



我安装了 MSYS2 软件包管理器复制到默认文件夹 C:\ msys64 中,通过运行 update-core pacman -Su



然后下载使用 pacman -S mingw-w64-x86_64-gcc 的MinGW64程序包已放入 C:\\\\\\\\\\\\\\\\\\\\\\\\\\\ c $ c $。

问题是, pacman -S mingw-w64-x86_64-gcc 目前正在下载版本5.0,CLion尚未支持。



MSYS2是否支持安装旧版本的软件包(MinGW版本 4.9.2 应该工作得很好)?我尝试使用 pacman -Ss mingw 搜索MinGW软件包,但该列表非常长,因为我之前没有使用过MinGW,我真的不知道该怎么做选择。

解决方案

不,MSYS2不直接支持安装旧版本的软件包。以下是你可以做的一些事情:




  • 看看 http://repo.msys2.org/ 查看您正在寻找的版本是否仍然在服务器上。它最终会被删除,但你可能会很幸运。您可以下载它,然后使用 pacman -U filename.tar.xz
  • 安装它
  • 存储库 https://github.com/Alexpux/MINGW-packages https://github.com/Alexpux/MSYS2-packages 具有所有MSYS2软件包的构建脚本,因此您可以查看其版本历史记录以查找脚本构建您感兴趣的软件包。



  • GCC是构建和使用的较为困难的软件包之一,因此对您来说可能很困难从源代码编译它。也要注意C ++ ABI在GCC 4和5之间改变了,所以你用旧GCC编译的二进制文件可能不适用于使用GCC 5编译的任何MSYS2 C ++共享库。

    I decided to try CLion for Windows, which recommends either MinGW or Cygwin for compilation.

    I installed the MSYS2 package manager into the default folder, C:\msys64, updated it by running update-core and pacman -Su.

    I then downloaded the MinGW64 package using pacman -S mingw-w64-x86_64-gcc, which has been placed into C:\msys64\mingw64.

    The problem is, pacman -S mingw-w64-x86_64-gcc currently downloads the version 5.0, which is not yet supported by CLion.

    Does MSYS2 support installing older versions of packages (the MinGW version 4.9.2 should work just fine)? I tried searching for the MinGW packages using pacman -Ss mingw, but the list is incredibly long and as I haven't worked with MinGW before, I really do not know what to choose.

    解决方案

    No, MSYS2 does not directly support installing old versions of packages. Here are some things you can do though:

    GCC is one of the harder packages to build and work with so it might be difficult for you to compile it from source. Also beware that the C++ ABI changed between GCC 4 and 5 or something like that, so binaries you build with the old GCC might not work with any of the MSYS2 C++ shared libraries compiled with GCC 5.

    这篇关于如何使用MSYS2获取旧版本的软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆