Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

Cmake has been installed but when other program need to use it, it still says not installed

Writer 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.3

However, 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 cmake

How 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 -version

then 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/bin

Then . ~/.bashrc before you retry the build.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy