big bai
big bai

Reputation: 61

Error: "Could NOT find OpenMP_C" when install LightGBM on MacOS

While installing LightGBM on Mac OS, I got the following error:

CMake Error at /usr/local/Cellar/cmake/3.12.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
Call Stack (most recent call first): 
  /usr/local/Cellar/cmake/3.12.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/Cellar/cmake/3.12.4/share/cmake/Modules/FindOpenMP.cmake:466 (find_package_handle_standard_args)
  CMakeLists.txt:82 (find_package)

enter image description here

I am following the official manual, the error comes at cmake .. step:

enter image description here

Thank you for your help if you can help me.

Upvotes: 5

Views: 3341

Answers (1)

janmonko
janmonko

Reputation: 191

The solution from the Darts installation guide worked for me. You need to downgrade the libomp library:

wget https://raw.githubusercontent.com/Homebrew/homebrew-core/fb8323f2b170bd4ae97e1bac9bf3e2983af3fdb0/Formula/libomp.rb
brew unlink libomp
brew install libomp.rb

Upvotes: 4

Related Questions