CentOS 6.X 安装使用Ninja
1.由于ninja需要GLIBC_2.15,CentOS 6.X的glibc只有GLIBC_2.12,所以需要更新glibc,可以使用下面的脚本进行更新:
1#! /bin/sh
2# update glibc to 2.17 for CentOS 6
3
4wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm
5wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm
6wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm
7wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm
8
9sudo rpm -Uvh glibc-2.17-55.el6.x86_64.rpm \
10glibc-common-2.17-55.el6.x86_64.rpm \
11glibc-devel-2.17-55.el6.x86_64.rpm \
12glibc-headers-2.17-55.el6.x86_64.rpm
2.先从官方下载Ninja的Linux二进制文件 ninja,目前最新版本为1.9.0,解压并复制到/usr/local/bin 3.在写好的CMake项目使用以下命令进行构建
1mkdir build
2cd build
3cmake .. -G "Ninja"
4ninja
- 原文作者:Witton
- 原文链接:https://wittonbell.github.io/posts/2019/2019-11-19-CentOS-6.X-安装使用Ninja/
- 版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议. 进行许可,非商业转载请注明出处(作者,原文链接),商业转载请联系作者获得授权。