当我执行 cmake --version 时,我得到了这个 -
cmake version 2.6-patch 4
答案1
(压缩的)tar 文件的编译过程通常包括:
./configure
make
sudo make install
第一行通常可以有多个选项(例如--prefix=/usr
安装可执行文件/usr/bin
而不是更常见的默认值/usr/local/bin
)。单独运行configure
永远不足以从这样的 tar 文件安装软件。
然而你应该总是查看是否有名为 INSTALL* 或 README* 的文件,并查看是否有特殊说明。因为cmake
有一个README.rst
告诉你:
Building CMake from Scratch
---------------------------
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
因此,您应该遵循摘要中的建议。