In a previous article, I described how it's possible to Install and use cmake 3.4.1 in Ubuntu 14.04 using alternatives.
Since then a couple of new versions were released and the same procedure can still be used to install cmake 3.10.1.
Download and compile:
tar -xvzf cmake-3.10.1.tar.gz
Make's install command installs cmake by default in /usr/local/bin/cmake, shared files are installed into /usr/local/share/cmake-3.10.
To install (copy) the binary and libraries to the new destination, run:
sudo make install
If you haven't already installed a newer cmake installation, run the following command to tell Ubuntu that the cmake command is now being replaced by an alternative installation:
sudo update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force
If you already have a custom cmake version installed (in my case I still had the 3.4.1 version active), the update-alternatives command is not necessary. The make install command will replace the existing binary in /usr/local/bin/cmake. This can be verified using:
cmake version 3.10.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
ck from Switzerland wrote on May 23rd, 2018:
Thanks for the note, I corrected it.
Just a reader :) from somewhere wrote on May 21st, 2018:
You forgot to update the version in the line:
tar -xvzf cmake-3.4.1.tar.gz
and the one after that.
AWS Android Ansible Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Container Containers CouchDB DB DNS Database Databases Docker ELK ElasticSearch Elasticsearch Filebeat FreeBSD GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Icingaweb2 InfluxDB Internet Java Kibana Kubernetes LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Rancher SSL Security Shell SmartOS Solaris Surveillance SystemD TLS Tomcat Ubuntu Unix VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder