LightGBM: Can't install R-package on macOS

I tried to install R-package on my mac according to the installation guide below.

git clone --recursive https://github.com/Microsoft/LightGBM
cd LightGBM/R-package
Rscript build_package.R
export CXX=g++-7 CC=gcc-7  # for macOS (replace 7 with version of gcc installed on your machine)
R CMD INSTALL lightgbm_2.1.0.tar.gz --no-multiarch

(on https://github.com/Microsoft/LightGBM/tree/master/R-package)

However I couldn’t install it. Please tell me how should I do.

Environment info

OS: macOS High Sierra 10.13.4 R version 3.5.0 (2018-04-23) – “Joy in Playing”

Error Message:

$ Rscript build_package.R
Error: Cannot find folder LightGBM/include
In addition: Warning message:
In file.copy("./../include", "./src/", overwrite = TRUE, recursive = TRUE) :
  'recursive' will be ignored as 'to' is not a single existing directory
Execution halted

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (3 by maintainers)

Most upvoted comments

I am going to make and propose a ./build_r.sh that can be run from the repo root to make this clearer for people. Working on it this weekend

you can try:

rm -rf LightGBM
git clone --recursive https://github.com/Microsoft/LightGBM
cd LightGBM/R-package
export CXX=g++-7 CC=gcc-7  # for macOS (replace 7 with version of gcc installed on your machine)
R CMD INSTALL --build . --no-multiarch

BTW, did you install gcc-7, or it is gcc-8?