Я попытался установить пакет R "lightgbm" с devtools на Mac (High Sierra 10.13.5; R версия 3.5.0; devtools 1.13.5).
Однако произошла ошибка, и сообщение нижебыло показано.
> library(devtools)
> install_github("Microsoft/LightGBM", subdir = "R-package")
Downloading GitHub repo Microsoft/LightGBM@master
from URL https://api.github.com/repos/Microsoft/LightGBM/zipball/master
Installing lightgbm
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save \
--no-restore --quiet CMD INSTALL \
'/private/var/folders/5n/8jscplj12gg0b6_p9h_rqcmc0000gn/T/RtmpNnPRWk/devtools35b1eee5504/Microsoft-LightGBM-c0147cb/R-package' \
--library='/Library/Frameworks/R.framework/Versions/3.5/Resources/library' --install-tests
* installing *source* package ‘lightgbm’ ...
** libs
installing via 'install.libs.R' to /Library/Frameworks/R.framework/Versions/3.5/Resources/library/lightgbm
-- The C compiler identification is AppleClang 9.1.0.9020039
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:27 (message):
AppleClang isn't supported. Please see
https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#macos
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/5n/8jscplj12gg0b6_p9h_rqcmc0000gn/T/RtmpNnPRWk/devtools35b1eee5504/Microsoft-LightGBM-c0147cb/R-package/src/build/CMakeFiles/CMakeOutput.log".
make: *** No rule to make target `_lightgbm'. Stop.
Error in eval(ei, envir) : Cannot find lib_lightgbm.so
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/lightgbm’
Installation failed: Command failed (1)
Warning message:
GitHub repo contains submodules, may not function as expected!
Так что я бы хотел использовать gcc (я установил его через homebrew) вместо AppleClang.
Как я могу это сделать?
Спасибо