CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.6.0 or higher is required. You are running version 3.5.1
-- Configuring incomplete, errors occurred!I know Ubuntu uses stable releases that it can support, but some repos require later versions of cmake. I want to overwrite the old cmake with the later version of cmake, but the common PPA doesn't carry the cmake I need. How can I upgrade cmake to use the needed version without conflicts with the older version?
03 Answers
Warning -- Do not do step 2 if you have Robot Operating System (ROS) installed
Check your current version with:
cmake --versionUninstall it with:
sudo apt remove cmakeVisit and download the latest bash script.
- In my case
cmake-3.6.2-Linux-x86_64.shis sufficient.
- In my case
Copy the script to
/opt/.Make the script executable:
chmod +x /opt/cmake-3.*your_version*.shChange to desired installation directory (to
/opt/for example)- As of cmake 3.10.2 the installer no longer seems to install to
/optby default
- As of cmake 3.10.2 the installer no longer seems to install to
Run:
sudo bash /opt/cmake-3.*your_version*.shYou will need to press
ytwice.The script installs the binary to
/opt/cmake-3.*your_version*so in order to get thecmakecommand, make a symbolic link:sudo ln -s /opt/cmake-3.*your_version*/bin/* /usr/local/binTest your results with:
cmake --version
In the new version of cmake (ex: 3.9.6), to install, download tar file from . Extract the downloaded tar file and then:
cd $CMAKE_DOWNLOAD_PATH
./configure
make
sudo make install 4 I would like to follow your advice Wolf, but the script don't install the prog. So i just creat the folder but doesn't show like installed when i do
cmake --version I find a other way peraps more easy :
sudo -E add-apt-repository -y ppa:george-edison55/cmake-3.x
sudo -E apt-get update
sudo apt-get install cmake 2