Cmake update and install - I2PC/xmipp GitHub Wiki

Xmipp requires a Cmake version 3.16 or above.

Ubuntu and Debian

If you have not installed cmake please

sudo apt-get install -y cmake cmake-data

If you have an older version, to install the newest:

  • sudo apt remove -y cmake cmake-data
  • hash -r
  • sudo apt-get install -y cmake cmake-data
  • hash -r

Centos

To uninstall cmake

  • Go to the cmake directory (cd / && find . -type d -name "*cmake*")
  • sudo make uninstall
  • cd .. && rm -rf path/to/cmake

To install cmake

  • wget https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3.tar.gz
  • tar -zxvf cmake-3.17.3.tar.gz
  • cd cmake-3.17.3
  • ./bootstrap
  • make
  • sudo make install
  • Verify the installed version by typing sudo --version

Older Ubuntu (18.0.4)

To update gcc from v7

  • sudo apt-get remove gcc-7
  • sudo apt-get install gcc-8
  • sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8

To Update Cmake

  • wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add -

  • sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'

  • sudo apt-get update