mac/linux 安装cmake 3.1.0

 

最近在编译hadoop3.2.0源码的时候,发现cmake编译不过去,貌似需要调整cmake版本.  (结果就是白折腾)

估计是在安装 xcode9的时候, 软件自动做了升级.

 

 

如果单独安装的话,推荐采用 brew install cmake .

 

源码安装:

 

cmake 版本: 3.1.0

下载链接: https://pan.baidu.com/s/14rh1U7pnNLdw_t44a9p9zQ  密码:cawg

 

安装方式:

 

1. 下载cmake 在Source distributions: 选择 cmake-3.1.0.tar.gz

2. 解压后进入文件夹进行安装,依次在终端输入

./bootstrap  

make      

make install

(若在make install过程中,提醒需要管理员权限,则可输入 sudo make install,按提示输入密码)

 

3.测试

cmake version
 

 

 

原文API:

 

UNIX/Mac OSX/MinGW/MSYS/Cygwin
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You need to have a compiler and a make installed.
Run the ``bootstrap`` script you find the in the source directory of CMake.
You can use the ``--help`` option to see the supported options.
You may use the ``--prefix=<install_prefix>`` option to specify a custom
installation directory for CMake. You can run the ``bootstrap`` script from
within the CMake source directory or any other build directory of your
choice. Once this has finished successfully, run ``make`` and
``make install``.  In summary::

 $ ./bootstrap && make && make install

 

 

 

 

 

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值