简体   繁体   English

在Mac OS上'sudo gem install eventmachine -v 1.0.8'时出错

[英]error while 'sudo gem install eventmachine -v 1.0.8 ' on mac os

This is an error i'm facing while installing eventmachine on mac os, i've tried all answers but can't solve it till now and here is the error logs. 这是我在Mac OS上安装eventmachine时遇到的错误,我已经尝试了所有答案,但直到现在仍无法解决,这是错误日志。

 <pre><code>Building native extensions. This could take a while... ERROR: Error installing eventmachine: ERROR: Failed to build gem native extension. /usr/local/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_fdset_t in ruby/intern.h... yes checking for pipe2() in unistd.h... no checking for accept4() in sys/socket.h... no checking for SOCK_CLOEXEC in sys/socket.h... no 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 CFLAGS=$(cflags) -pipe -I/opt/local/include -Wall -Wextra -Wno-deprecated-declarations -Wno-ignored-qualifiers -Wno-unused-result CPPFLAGS=-D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT $(DEFS) $(cppflags) -Wall -Wextra -Wno-deprecated-declarations -Wno-ignored-qualifiers -Wno-unused-result 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:0: project.h:29:20: fatal error: iostream: No such file or directory #include <iostream> ^ compilation terminated. make: *** [binder.o] Error 1 make failed, exit code 2 Gem files will remain installed in /usr/local/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.8 for inspection. Results logged to /usr/local/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/eventmachine-1.0.8/gem_make.out</code></pre> 

please any help would be appreciated. 请任何帮助将不胜感激。

This is your problem: 这是你的问题:

make "DESTDIR="
compiling binder.cpp
In file included from binder.cpp:20:0:
project.h:29:20: fatal error: iostream: No such file or directory
#include <iostream>

What's occurring is that the compiler cannot find project.h's include iostream. 发生的情况是编译器找不到project.h的include iostream。 You could play around with installing it manually, link provided below. 您可以手动安装,下面提供了链接。

https://github.com/eventmachine/eventmachine/wiki/Building-EventMachine https://github.com/eventmachine/eventmachine/wiki/Building-EventMachine

This link may help solve your problem. 此链接可以帮助您解决问题。

C++ Hello World trouble on OSX10.8 OSX10.8上的C ++ Hello World故障

Another potential quick fix is to install it manually and see if adding the header extension will solve your issue. 另一个可能的快速解决方案是手动安装它,然后查看添加标题扩展名是否可以解决您的问题。

#include <iostream.h>

If you are using Mac OSX el captain, openssl headers are not installed by default therefore try installing openssl. 如果您使用的是Mac OSX el captain,则默认情况下未安装openssl标头,因此请尝试安装openssl。 If openssl is already installed try to relink using following command 如果已安装openssl,请尝试使用以下命令重新链接

brew link openssl --force

See this issue for more detail - https://github.com/eventmachine/eventmachine/issues/643 有关更多详细信息,请参见此问题-https: //github.com/eventmachine/eventmachine/issues/643

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM