msys2安装make和cmake

msys2安装make和cmake

上来先安装一个基础工具包(mingw-w64工具链):

pacman -S mingw-w64-x86_64-toolchain

这个工具链不包含make、cmake。

1.安装make

shell 复制代码
$ pacman -Qs make
local/make 4.4.1-2
    GNU make utility to maintain groups of programs
local/perl 5.38.2-1
    A highly capable, feature-rich programming language

查看make相关文件:

shell 复制代码
$ pacman -Ql local/make
make /usr/
make /usr/bin/
make /usr/bin/make.exe
make /usr/include/
make /usr/include/gnumake.h
make /usr/share/
make /usr/share/info/
make /usr/share/info/make.info-1.gz
make /usr/share/info/make.info-2.gz
make /usr/share/info/make.info-3.gz
make /usr/share/info/make.info.gz
......

$ make -v
GNU Make 4.4.1
Built for x86_64-pc-msys
Copyright (C) 1988-2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

可以看到make.exe在/usr/bin目录下。

2.安装cmake

查找:

shell 复制代码
$ pacman -Ss cmake
......
mingw32/mingw-w64-i686-cmake 3.29.6-1
    A cross-platform open-source make system (mingw-w64)
mingw64/mingw-w64-x86_64-cmake 3.29.6-1
    A cross-platform open-source make system (mingw-w64)
......
msys/cmake 3.29.6-1
    A cross-platform open-source make system
......

安装:

shell 复制代码
$ pacman -S mingw-w64-x86_64-cmake

$ pacman -Q|grep cmake
mingw-w64-x86_64-cmake 3.29.6-1

$ pacman -Ql mingw-w64-x86_64-cmake
mingw-w64-x86_64-cmake /mingw64/
mingw-w64-x86_64-cmake /mingw64/bin/
mingw-w64-x86_64-cmake /mingw64/bin/cmake.exe
mingw-w64-x86_64-cmake /mingw64/bin/cpack.exe
mingw-w64-x86_64-cmake /mingw64/bin/ctest.exe
mingw-w64-x86_64-cmake /mingw64/share/
mingw-w64-x86_64-cmake /mingw64/share/aclocal/
mingw-w64-x86_64-cmake /mingw64/share/aclocal/cmake.m4

$ cmake --version
cmake version 3.29.6

CMake suite maintained and supported by Kitware (kitware.com/cmake).

可以看到cmake.exe在/mingw64/bin/目录下。

3.安装git

shell 复制代码
pacman -S git

$ pacman -Q|grep git
git 2.45.2-1

$ git --version
git version 2.45.2

$ pacman -Ql git 2.45.2-1
git /usr/
git /usr/bin/
git /usr/bin/git-cvsserver
git /usr/bin/git-receive-pack.exe
git /usr/bin/git-shell.exe
git /usr/bin/git-upload-archive.exe
git /usr/bin/git-upload-pack.exe
git /usr/bin/git.exe
git /usr/bin/gitk
git /usr/bin/scalar.exe
......

可以看到git.exe在/usr/bin/目录下。

相关推荐
likfishdn14 分钟前
Linux的文件与目录管理
linux·运维·服务器
chian-ocean33 分钟前
Linux 文件缓冲区:高效数据访问的幕后推手
linux·运维·服务器
加油=^_^=35 分钟前
【Linux】进程优先级 | 进程调度(三)
linux·运维·服务器
吃汤圆的抹香鲸1 小时前
GoLand 安装包 绿色版 Win,Mac,Linux 包含IntelliJ全家桶 专为Go语言设计的集成开发环境(IDE)
linux·windows·macos·go·intellij-idea·go1.19
追寻光1 小时前
Cannot find a valid baseurl for repo: base/7/x86_64
linux
元气满满的热码式1 小时前
Docker数据卷操作实战
linux·运维·docker·云原生·容器
陆沙1 小时前
deepseek-r1-centos-本地服务器配置方法
linux·服务器·centos
吃汤圆的抹香鲸2 小时前
Rider 安装包 绿色版 Win/Mac/Linux 适合.NET和游戏开发者使用 2025全栈开发终极指南:从零配置到企业级实战
linux·运维·windows·sql·游戏·macos·.net
sz66cm2 小时前
Linux基础 -- ARM 32 位架构动态注入代码技术文档
linux·arm开发·架构
Mr.pyZhang4 小时前
Android构建系统 - 04 编译产物
android·linux