Jekyll eventmachine 1.2.7 error on bundle



我试图运行bundle install使用ubuntu 20.04, rvm与ruby 2.7.2,我不能得到eventmachine gem安装。在谷歌上搜索了几个小时后,我找不到一个适合我的解决方案。我试过删除lockfile和运行bundle, ruby-dev已经安装了最新版本,我试过用ruby 2.6.6运行bundle,更新bundle,更新Jekyll从4.0.0到4.2.0,无论我尝试什么,我仍然得到这些错误信息,我不明白,所以任何帮助都会非常感激!

Gemfile

source 'https://rubygems.org'
gem 'jekyll', '4.0.0'
group :jekyll_plugins do
gem 'jekyll-feed', '0.12.1'
gem 'jekyll-paginate', '1.1.0'
gem 'jekyll-seo-tag', '2.6.1'
gem 'jekyll-sitemap', '1.3.1'
end

相关bundle日志

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/jordan/Programming/galblog/vendor/bundle/ruby/2.7.0/gems/eventmachine-1.2.7/ext
/home/jordan/.rvm/rubies/ruby-2.7.2/bin/ruby -I /home/jordan/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0 -r ./siteconf20210214-26199-1f75y70.rb extconf.rb
checking for -lcrypto... yes
checking for -lssl... yes
checking for openssl/ssl.h... yes
checking for openssl/err.h... yes
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_without_gvl() in ruby/thread.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 inotify_init() in sys/inotify.h... yes
checking for writev() in sys/uio.h... yes
checking for pipe2() in unistd.h... yes
checking for accept4() in sys/socket.h... yes
checking for SOCK_CLOEXEC in sys/socket.h... yes
checking for sys/event.h... no
checking for epoll_create() in sys/epoll.h... yes
checking for clock_gettime()... yes
checking for CLOCK_MONOTONIC_RAW in time.h... yes
checking for CLOCK_MONOTONIC in time.h... yes
CXXFLAGS=-g -O2 -Wall -Wextra -Wno-deprecated-declarations -Wno-ignored-qualifiers -Wno-unused-result -Wno-address
creating Makefile
current directory: /home/jordan/Programming/galblog/vendor/bundle/ruby/2.7.0/gems/eventmachine-1.2.7/ext
make "DESTDIR=" clean
current directory: /home/jordan/Programming/galblog/vendor/bundle/ruby/2.7.0/gems/eventmachine-1.2.7/ext
make "DESTDIR="
compiling binder.cpp
compiling cmain.cpp
compiling ed.cpp
compiling em.cpp
em.cpp: In member function ‘void EventMachine_t::SignalLoopBreaker()’:
em.cpp:316:14: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
316 |  (void)write (LoopBreakerWriter, "", 1);
|        ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
em.cpp: In member function ‘void EventMachine_t::_ReadLoopBreaker()’:
em.cpp:1109:13: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
1109 |  (void)read (LoopBreakerReader, buffer, sizeof(buffer));
|        ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compiling kb.cpp
kb.cpp: In member function ‘virtual void KeyboardDescriptor::Read()’:
kb.cpp:77:13: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
77 |  (void)read (GetSocket(), &c, 1);
|        ~~~~~^~~~~~~~~~~~~~~~~~~~
compiling page.cpp
compiling pipe.cpp
compiling rubymain.cpp
rubymain.cpp: In function ‘void event_callback_wrapper(uintptr_t, int, const char*, long unsigned int)’:
rubymain.cpp:220:105: warning: ‘VALUE ruby::backward::cxxanyargs::rb_rescue(VALUE (*)(...), VALUE, VALUE (*)(...), VALUE)’ is deprecated: Use of ANYARGS in this function is deprecated
[-Wdeprecated-declarations]
220 |   rb_rescue((VALUE (*)(ANYARGS))event_callback, (VALUE)&e, (VALUE (*)(ANYARGS))event_error_handler, Qnil);
|                                                                                                         ^
In file included from /home/jordan/.rvm/rubies/ruby-2.7.2/include/ruby-2.7.0/ruby/ruby.h:2863,
from /home/jordan/.rvm/rubies/ruby-2.7.2/include/ruby-2.7.0/ruby.h:33,
from em.h:24,
from project.h:168,
from rubymain.cpp:20:
/home/jordan/.rvm/rubies/ruby-2.7.2/include/ruby-2.7.0/ruby/backward/cxxanyargs.hpp:198:1: note: declared here
198 | rb_rescue(type *q, VALUE w, type *e, VALUE r)
| ^~~~~~~~~
rubymain.cpp:220:105: warning: ‘VALUE ruby::backward::cxxanyargs::rb_rescue(VALUE (*)(...), VALUE, VALUE (*)(...), VALUE)’ is deprecated: Use of ANYARGS in this function is deprecated
[-Wdeprecated-declarations]
220 |   rb_rescue((VALUE (*)(ANYARGS))event_callback, (VALUE)&e, (VALUE (*)(ANYARGS))event_error_handler, Qnil);
|                                                                                                         ^
In file included from /home/jordan/.rvm/rubies/ruby-2.7.2/include/ruby-2.7.0/ruby/ruby.h:2863,
from /home/jordan/.rvm/rubies/ruby-2.7.2/include/ruby-2.7.0/ruby.h:33,
from em.h:24,
from project.h:168,
from rubymain.cpp:20:
/home/jordan/.rvm/rubies/ruby-2.7.2/include/ruby-2.7.0/ruby/backward/cxxanyargs.hpp:198:1: note: declared here
198 | rb_rescue(type *q, VALUE w, type *e, VALUE r)
| ^~~~~~~~~
compiling ssl.cpp
linking shared-object rubyeventmachine.so
current directory: /home/jordan/Programming/galblog/vendor/bundle/ruby/2.7.0/gems/eventmachine-1.2.7/ext
make "DESTDIR=" install
make: /usr/bin/mkdir: Command not found
make: *** [Makefile:202: .sitearchdir.time] Error 127
make install failed, exit code 2
Gem files will remain installed in /home/jordan/Programming/galblog/vendor/bundle/ruby/2.7.0/gems/eventmachine-1.2.7 for inspection.
Results logged to /home/jordan/Programming/galblog/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/eventmachine-1.2.7/gem_make.out
An error occurred while installing eventmachine (1.2.7), and Bundler cannot continue.
Make sure that `gem install eventmachine -v '1.2.7' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
jekyll-feed was resolved to 0.12.1, which depends on
jekyll was resolved to 4.0.0, which depends on
em-websocket was resolved to 0.5.2, which depends on
eventmachine

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/jordan/Programming/galblog/vendor/bundle/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
/home/jordan/.rvm/rubies/ruby-2.7.2/bin/ruby -I /home/jordan/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0 -r ./siteconf20210214-26199-8qwb9v.rb extconf.rb
creating Makefile
current directory: /home/jordan/Programming/galblog/vendor/bundle/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR=" clean
current directory: /home/jordan/Programming/galblog/vendor/bundle/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
compiling ruby_http_parser.c
compiling ryah_http_parser.c
linking shared-object ruby_http_parser.so
current directory: /home/jordan/Programming/galblog/vendor/bundle/ruby/2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR=" install
make: /usr/bin/mkdir: Command not found
make: *** [Makefile:202: .sitearchdir.time] Error 127
make install failed, exit code 2
Gem files will remain installed in /home/jordan/Programming/galblog/vendor/bundle/ruby/2.7.0/gems/http_parser.rb-0.6.0 for inspection.
Results logged to /home/jordan/Programming/galblog/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/http_parser.rb-0.6.0/gem_make.out
An error occurred while installing http_parser.rb (0.6.0), and Bundler cannot continue.
Make sure that `gem install http_parser.rb -v '0.6.0' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
jekyll-feed was resolved to 0.12.1, which depends on
jekyll was resolved to 4.0.0, which depends on
em-websocket was resolved to 0.5.2, which depends on
http_parser.rb

我又试了一次,这次使用ruby 2.7.1而不是2.7.2,它工作了。我猜是ruby的一些更新破坏了它,所以对于那些坚持使用2.7.1或不是最新版本的ruby的人来说。

最新更新