Install and configure cmake in centos 6.3

Source: Internet
Author: User

Installation instructions
Installation environment: CentOS-6.3
Installation Method: source code compilation and Installation
Software: cmake-2.8.10.2.tar.gz
: Http://www.cmake.org/cmake/resources/software.html

Prerequisites
G ++ and ncurses-devel have been installed in the system. If they are not installed, run the following command to install them:

 

Copy the Code as follows:
[[Email protected]/] # Yum install gcc-C ++
[[Email protected]/] # Yum install ncurses-devel

 

Install cmake
Upload the cmake-2.8.10.2.tar.gz file to/usr/local and perform the following operations:

 

Copy the Code as follows:
[[Email protected] # cd/usr/local
[[Email protected] # tar-zxv-F cmake-2.8.10.2.tar.gz // extract the compressed package
[[Email protected] # rm-RF cmake-2.8.10.2.tar.gz // Delete compressed package
[[Email protected] # cd cmake-2.8.10.2
[[Email protected] cmake-2.8.10.2] #./configure
[[Email protected] cmake-2.8.10.2] # Make
[[Email protected] cmake-2.8.10.2] # make install
[[Email protected] # mv cmake-2.8.10.2 cmake // modify folder name

 

Add Environment Variables
Use VI to add variables to the/etc/profile file to make them permanently valid:
[[Email protected] # vi/etc/profile // modify Environment Variables

Append the following two lines of code to the end of the file:

Copy the Code as follows:
Path =/usr/local/cmake/bin: $ path
Export path

 

Then, perform the following operations:

Copy the Code as follows:
[[Email protected] # source/etc/profile // make the modification take effect
[[Email protected] # echo $ PATH // view the PATH value

 

Verify cmake Installation

Copy the Code as follows:
[[Email protected] # cmake -- version
Cmake version 2.8.10.2


The preceding prompt is displayed, indicating that the installation is successful.

Install and configure cmake in centos 6.3

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.