LoginSignup
3
0

More than 5 years have passed since last update.

ruby-opencvがインストールできない

Last updated at Posted at 2018-05-01

環境

High Sierra 10.10.3
HomeBrew 1.6.2
gem 2.4.5.1
OpenCV3

実行コマンド

gem install ruby-opencv

エラー

Building native extensions.  This could take a while...
ERROR:  Error installing ruby-opencv:
    ERROR: Failed to build gem native extension.


>> Check the required libraries...
checking for main() in -lstdc++... yes
checking for main() in -lopencv_calib3d... yes
checking for main() in -lopencv_contrib... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

解決策

OpenCV3にはlopencv_contribがないのでOpenCV2をインストール

brew install opencv@2

gemをインストールする際にOpenCV2のパスを指定

gem install ruby-opencv -- --with-opencv-dir=/usr/local/opt/opencv@2

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0