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