【问题标题】:Bundle Install will not update eventmachine gem捆绑安装不会更新 eventmachine gem
【发布时间】:2023-03-23 00:50:01
【问题描述】:

我正在尝试从 Github 克隆存储库,并且正在运行“捆绑安装”的步骤中。但是,每次我尝试运行它时,都会收到以下消息:

An error occurred while installing eventmachine (1.0.3), and Bundler cannot
continue.
Make sure that `gem install eventmachine -v '1.0.3'` succeeds before bundling.

当我运行“gem install eventmachine -v '1.0.3'”时,我得到了

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

    /Users/christinating/.rbenv/versions/2.1.5/bin/ruby extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... 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_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
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling binder.cpp
In file included from binder.cpp:20:
In file included from ./project.h:29:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iostream:38:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:216:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__locale:15:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string:439:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:628:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:604:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iterator:341:10: fatal error: '__debug' file not found
#include <__debug>
         ^
1 error generated.
make: *** [binder.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/christinating/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.3 for inspection.
Results logged to /Users/christinating/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/eventmachine-1.0.3/gem_make.out

我已经尝试了一些我在网上找到的解决方案(都没有奏效):

  1. 我已将 .ruby-version 文件和 gemfile 中的 ruby​​ 版本更改为 2.1.5。

  2. 我还将 gemfile.lock 和 gemfile 中的 eventmachine 版本更改为 1.0.4 和 1.0.7。每次更改后,我都尝试运行 bundle install 或 gem install eventmachine。刚刚产生了以下内容:

获取:eventmachine-1.0.7.gem (100%) 构建原生扩展。这可能需要一段时间... 错误:安装事件机器时出错: 错误:无法构建 gem 原生扩展。

        /Users/christinating/.rbenv/versions/2.1.5/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 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:
    In file included from ./project.h:29:
    In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iostream:38:
    In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:216:
    In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__locale:15:
    In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string:439:
    In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:628:
    In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:604:
    /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iterator:341:10: fatal error: '__debug' file not found
    #include <__debug>
             ^
    1 error generated.
    make: *** [binder.o] Error 1

    make failed, exit code 2

    Gem files will remain installed in /Users/christinating/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.7 for inspection.
    Results logged to /Users/christinating/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/eventmachine-1.0.7/gem_make.out
    Christinas-iMac:scholarhood christinating$ gem install eventmachine
    Building native extensions.  This could take a while...
    ERROR:  Error installing eventmachine:
        ERROR: Failed to build gem native extension.

        /Users/christinating/.rbenv/versions/2.1.5/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 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:
    In file included from ./project.h:29:
    In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iostream:38:
    In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:216:
    In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__locale:15:
    In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string:439:
    In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:628:
    In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:604:
    /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iterator:341:10: fatal error: '__debug' file not found
    #include <__debug>
             ^
    1 error generated.
    make: *** [binder.o] Error 1

    make failed, exit code 2

    Gem files will remain installed in /Users/christinating/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.7 for inspection.
    Results logged to /Users/christinating/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/eventmachine-1.0.7/gem_make.out

我真的没有想法,真的需要一些帮助!!!

【问题讨论】:

标签: ruby-on-rails ruby gem


【解决方案1】:

发生的事情是我没有安装 xcode!下载后,我就可以运行 bundle install 和 update eventmachine

【讨论】:

  • 一定是某个库与 xcode 捆绑在一起。有谁知道这是什么?
  • 不需要安装Xcode,只要确保你已经安装了最新的Xcode命令行工具。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-09-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-06-26
相关资源
最近更新 更多