How to install cmake 3.3.2 on ubuntu 14.04?

How to install cmake 3.3.2 on ubuntu 14.04?

Either use a PPA or compile it yourself:

Installation by a PPA (目前只能升级到3.2)

1
2
3
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update
  • When cmake is not yet installed:
    sudo apt-get install cmake

  • When cmake is already installed:
    sudo apt-get upgrade

要升级到3.3.2必须自己编译

Currently, the latest version is 3.2.2, the following instructions based on this version. You should therefore check this URL and adjust the file name accordingly.

1
2
3
4
5
6
sudo apt-get install build-essential
wget http://www.cmake.org/files/v3.3/cmake-3.3.2.tar.gz
tar xf cmake-3.3.2.tar.gz
cd cmake-3.3.2
./configure
make

Now you can have to choose an installation type to decide, I recommend installing with checkinstall, as this creates a DEB package.

With checkinstall

1
2
sudo apt-get install checkinstall
sudo checkinstall

With make install

sudo make install