Cmake has been installed but when other program need to use it, it still says not installed
Sebastian Wright
I am on Ubuntu 16.04. First time using a Linux system.
I installed cmake and I can check it in the terminal by typing
/opt/cmake/bin/cmake -version
cmake version 2.8.3However, when I try to install another program that needs cmake
git clone --recursive
cd LightGBM
mkdir build ; cd build
cmake ..
The program 'cmake' is currently not installed. You can install it by typing:sudo apt install cmakeHow to fix this program? I thought I should set some path but I am not sure about that...
Also when I am in the folder where cmake is located and type cmake -version like this
~/cmake-2.8.3/bin$ cmake -versionthen it reports
The program 'cmake' is currently not installed. You can install it by typing:sudo apt install cmake 0 1 Answer
First, how did you "install cmake"? Using one of the Ubuntu package managers to install cmake=3.5.1-1ubuntu3 leaves the cmake binary in /usr/bin/, not /opt/cmake/bin.
To solve your problem, either sudo apt install cmake or add /opt/cmake/bin to your PATH. In your ~/.bashrc, add
PATH=$PATH:/opt/cmake/binThen . ~/.bashrc before you retry the build.