首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >gem eventmachine致命错误:找不到'openssl/ssl.h‘文件

gem eventmachine致命错误:找不到'openssl/ssl.h‘文件
EN

Stack Overflow用户
提问于 2015-06-13 19:56:49
回答 9查看 60.3K关注 0票数 289

刚安装了El Capitan,无法安装gem

..。

位于

..。尝试使用

但它似乎被忽视了。

上报给他们的

github存储库

还有。

任何建议都是非常感谢的。谢谢。

代码语言:javascript
复制
$ ls /usr/local/Cellar/openssl/1.0.2a-1/include/openssl/ssl.h
/usr/local/Cellar/openssl/1.0.2a-1/include/openssl/ssl.h

$ gem install eventmachine -v '1.0.7' -- --with-ssl-dir=/usr/local/Cellar/openssl/1.0.2a-1/include
/Users/pain/.rbenv/versions/2.1.2/bin/ruby -r ./siteconf20150612-56154-1hsjz2n.rb extconf.rb --with-ssl-dir=/usr/local/Cellar/openssl/1.0.2a-1/include
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_fdset_t in ruby/intern.h... 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... 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 
         ^
1 error generated.
make: *** [binder.o] Error 1

make failed, exit code 2
EN

回答 9

Stack Overflow用户

回答已采纳

发布于 2015-06-15 09:35:04

代码语言:javascript
复制
$ gem install eventmachine -- --with-cppflags=-I/usr/local/opt/openssl/include                                                                                                             
Building native extensions with: '--with-cppflags=-I/usr/local/opt/openssl/include'
This could take a while...
Successfully installed eventmachine-1.0.8
1 gem installed

您也可以像这样设置bundler,但我认为这是肤浅的

代码语言:javascript
复制
bundle config build.eventmachine --with-cppflags=-I/usr/local/opt/openssl/include
票数 541
EN

Stack Overflow用户

发布于 2015-07-20 20:31:16

使用bundler和自制软件时:

代码语言:javascript
复制
$ bundle config build.eventmachine --with-cppflags=-I$(brew --prefix openssl)/include
$ bundle install
票数 242
EN

Stack Overflow用户

发布于 2015-11-27 19:29:16

代码语言:javascript
复制
brew link --force openssl

然后:

代码语言:javascript
复制
gem install eventmachine

它还修复了:

gem安装任务

捆绑包安装

rake和rails任务

附注:您可能需要删除并运行

再一次

这个问题的发生是因为Apple已经从OSX中删除了openssl (在El Captain中)

票数 118
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30818391

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档