Gem :: Ext :: BuildError:错误:无法构建gem本机扩展

时间:2019-04-07 01:33:56

标签: ruby rubygems bundle

sudo bundle update失败,所以我按照两个步骤解决了这个问题。

sudo bundle update
sudo apt install ruby-dev
sudo apt install g++

,但是发生了另一个问题。

$ sudo bundle update
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies......
Using concurrent-ruby 1.1.5
Using i18n 0.9.5
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.2.3
Using public_suffix 3.0.3
Using addressable 2.5.2
Using bundler 2.0.1
Using colorator 1.1.0
Fetching eventmachine 1.2.7
Installing eventmachine 1.2.7 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.5.0/gems/eventmachine-1.2.7/ext
/usr/bin/ruby2.5 -r ./siteconf20190407-25827-zl4hc1.rb extconf.rb
checking for -lcrypto... no
checking for openssl/ssl.h... no
checking for -lcrypto... no
checking for openssl/ssl.h... no
checking for -lcrypto... no
checking for openssl/ssl.h... no
checking for -lcrypto... no
checking for openssl/ssl.h... no
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 -fdebug-prefix-map=/build/ruby2.5-VnpVLW/ruby2.5-2.5.1=. -fstack-protector-strong
-Wformat -Werror=format-security -Wall -Wextra -Wno-deprecated-declarations -Wno-ignored-qualifiers
-Wno-unused-result -Wno-address
creating Makefile

current directory: /var/lib/gems/2.5.0/gems/eventmachine-1.2.7/ext
make "DESTDIR=" clean
sh: 1: make: not found

current directory: /var/lib/gems/2.5.0/gems/eventmachine-1.2.7/ext
make "DESTDIR="
sh: 1: make: not found

make failed, exit code 127

Gem files will remain installed in /var/lib/gems/2.5.0/gems/eventmachine-1.2.7 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.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.

0 个答案:

没有答案