Install the latest CMake version in Ubuntu

Source: Internet
Author: User
The CMake version that comes with apt-getinstall in Ubuntu is a little old. The latest version of CMake2.8.9 is required in the project. This version is packaged with CPack. to experience the convenience of publishing a CPack, try it out. First, uninstall the installed old version CMakeapt-getautoremovecmake and then download: cd/usrwgethttp: // www.cmake.org/

The CMake version that comes with apt-get install in Ubuntu is a little old. The latest version of CMake 2.8.9 is required in the project. This version is packaged with CPack. to experience the convenience of publishing a CPack, try it out.

First, uninstall the installed old version CMake

Apt-get autoremove cmake

Then download:

Cd/usr

Wget http://www.cmake.org/files/v2.8/cmake-2.8.9-Linux-i386.tar.gz

Decompress:

Tar zxvf cmake-2.8.9-Linux-i386.tar.gz

Now, let's take a look at the unzipped directory structure:

  1. # Tree-L 2
  2. .
  3. ── Bin
  4. │ ── Ccmake
  5. │ ── Cmake
  6. │ ── Cmake-gui
  7. │ ── Cpack
  8. │ ── Ctest
  9. ── Doc
  10. │ ── Cmake-2.8.
  11. ├ ── Man
  12. │ ── Man1
  13. ── Share
  14. ── Aclocal
  15. ── Applications
  16. ── Cmake-2.8
  17. ── Mime
  18. ── Pixmaps
  19. 11 directories, 5 files
# tree -L 2.├── bin│   ├── ccmake│   ├── cmake│   ├── cmake-gui│   ├── cpack│   └── ctest├── doc│   └── cmake-2.8├── man│   └── man1└── share    ├── aclocal    ├── applications    ├── cmake-2.8    ├── mime    └── pixmaps11 directories, 5 files


There are various cmake product programs under bin, and cpack is also available. Very good. It is needed for the subsequent project.

 

Now create link:

  1. Ln-s/usr/cmake-2.8.9-Linux-i386/bin/*/usr/bin/
ln -s /usr/cmake-2.8.9-Linux-i386/bin/* /usr/bin/

Then run the following command to check:

  1. # Cmake -- version
  2. Cmake version 2.8.9
# cmake --versioncmake version 2.8.9

OK. The latest cmake version is successfully installed.

 

CMake official books are very expensive and always later than the latest version. If you want to see the latest documents, we recommend that you refer:

Http://www.cmake.org/cmake/help/cmake_tutorial.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.