ubuntu下安装cmake 3.4.1

3540阅读 0评论2016-11-09 mfc42d
分类:LINUX

最近要用libkafka-asio,发现需要cmake 3.1,ubuntu 14.04自带的cmake版本居然是2.8.
本来想通过
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update sudo apt-get install cmake 
但是发现**导致速度太慢,只好源码安装.
安装gtest
 
sudo apt-get install libgtest-dev
cd /usr/src/gtest
sudo cmake .
sudo make
sudo cp libg* /usr/lib/
 安装snappy

git clone git://github.com/trondn/snappy

cd snappy
cmake .
sudo make install

wget 
tar -xvzf cmake-3.4.1.tar.gz 
cd cmake-3.4.1/ 
./configure  
make
然后
sudo make install
sudo update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force 
运行
cmake --version 
cmake version 3.4.1


CMake suite maintained and supported by Kitware (kitware.com/cmake). 
上一篇:ubuntu下安装groovy
下一篇:offset是h2 数据库的一个关键字