19
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

homebrewでopensslを入れたら、bundle installでeventmachineのエラーが発生

Last updated at Posted at 2015-11-03

環境

  • MacOSX EL Capitan
  • Ruby2.1.7

現象

Macのbundle installeventmachineのインストールに失敗した

$ bundle install
.
.
.
Installing eventmachine 1.0.5 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /Users/tkmiya34/.anyenv/envs/rbenv/versions/2.1.7/bin/ruby extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for rb_thread_fd_select()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for sys/event.h... yes
checking for sys/queue.h... yes
checking for clock_gettime()... no
checking for gethrtime()... no
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling binder.cpp
In file included from binder.cpp:20:
./project.h:116:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
         ^
1 error generated.
make: *** [binder.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/tkmiya34/work/startup-technology/yaqs/yaqs-development/vendor/bundle/ruby/2.1.0/gems/eventmachine-1.0.5 for inspection.
Results logged to /Users/tkmiya34/work/startup-technology/yaqs/yaqs-development/vendor/bundle/ruby/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/eventmachine-1.0.5/gem_make.out
An error occurred while installing eventmachine (1.0.5), and Bundler cannot
continue.
Make sure that `gem install eventmachine -v '1.0.5'` succeeds before bundling.

解決方法

エラーメッセージ見たらopensslに問題がありそう。
opensslはhomebrewでインストールしています。

調べてたらeventmachineGitHub Issueに載っていました

$ brew link openssl --force
Linking /usr/local/Cellar/openssl/1.0.2d_1... 1548 symlinks created

もう一度 bundle installしたらインストール成功しました

19
18
1

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
19
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?