Skip to content

CentOS从源码编译安装Ninja

工具版本:

  • cmake version 3.27.8
  • gcc 7.4.0
  • g++ 7.4.0

下载源码:

bash
curl -LJO https://github.com/ninja-build/ninja/archive/refs/tags/v1.11.1.tar.gz

解压:

bash
tar zxf ninja-1.11.1.tar.gz

进入源码目录:

cd ninja-1.11.1

构建:

bash
cmake -Bbuild-cmake

编译:

make -j 8

安装:

bash
sudo make install