Ubuntu14.04安装Cmake3.2.2

来源:互联网 发布:linux 文件内容替换 编辑:程序博客网 时间:2024/05/20 15:10

由于Ubuntu14.04的cmake版本为2.8.x,而如果需要cmake3.x版本时,无法生成makefile,有两种方法可以安装cmake3.4.1:

方法1:


sudo apt-get install software-properties-commonsudo add-apt-repository ppa:george-edison55/cmake-3.xsudo apt-get updatesudo apt-get install cmakesudo apt-get upgrade方法2:
sudo apt-get install build-essentialwget http://www.cmake.org/files/v3.4/cmake-3.4.1.tar.gztar xf cmake-3.4.1.tar.gzcd cmake-3.4.1./configuremake
sudo apt-get install checkinstallsudo checkinstall
sudo make install

最后在终端输入:cmake --version

如果显示cmake version 3.4.1

则安装成功!

参考:http://blog.csdn.net/whuhjp/article/details/50186929

0 0
原创粉丝点击