Unable to install lightgbm package in r



I am trying to install lightgbm as , devtools::install_github(“Microsoft/LightGBM”, subdir = “R-package”)
But getting the following errors:

Warning: running command ‘cmake -DCMAKE_GENERATOR_PLATFORM=x64 …’ had status 127
Warning: running command ‘cmake --build . --target _lightgbm --config Release’ had status 127


Can you post your R version here? There is a problem with R 3.4 version. If you have one, roll it back to 3.3 and it should be resolved.


You need to have Git and cmake installed. Can you verify if you have cmake by the following command
cmake --version


I have installed both, but command terminal is not recognising cmake. It is showing that ‘cmake’ is not an internal or external command. What should be done in that case ?


Ok, I will try in R 3.3


This means cmake is not installed. Are you on Linux?
The following link provides instructions for installing cmake on different platforms :
See if installing that solves the problem?


I have installed cmake on windows. But command prompt is not recognising cmake as command .