无法在 m1 mac 上安装 jekyll (eventmachine)

问题描述 投票:0回答:4

我是 iOS 开发的真正新手,想创建一个新的 GitHub 博客。

我正在关注如何在Apple M1 Macbook上安装jekyll作为参考。

我尝试在我的 M1 Pro Macbook (macOS Monterey 12.6) 上安装 Jekyll,但使用

gem install --user-install bundler jekyll
安装 Bundler 和 Jekyll 时失败(输出如下)。

我已经读了很多博主的文章,他们终于成功了。我怎么解决这个问题?请有人帮助我!

[eric@~/blog/hyleedevelop.github.io]$ gem install --user-install bundler jekyll
Successfully installed bundler-2.3.24
Parsing documentation for bundler-2.3.24
Done installing documentation for bundler after 0 seconds
Building native extensions. This could take a while...
ERROR:  Error installing jekyll:
    ERROR: Failed to build gem native extension.

    current directory: /Users/eric/.gem/ruby/3.0.0/gems/eventmachine-1.2.7/ext
/Users/eric/.rbenv/versions/3.0.0/bin/ruby -I /Users/eric/.rbenv/versions/3.0.0/lib/ruby/3.0.0 -r ./siteconf20221026-8644-6ak8a4.rb extconf.rb
checking for -lcrypto... no
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... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.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 sys/event.h... yes
checking for sys/queue.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= -Wall -Wextra -Wno-deprecated-declarations -Wno-ignored-qualifiers -Wno-unused-result -Wno-address
creating Makefile

current directory: /Users/eric/.gem/ruby/3.0.0/gems/eventmachine-1.2.7/ext
make "DESTDIR=" clean

current directory: /Users/eric/.gem/ruby/3.0.0/gems/eventmachine-1.2.7/ext
make "DESTDIR="
compiling binder.cpp
compiling cmain.cpp
compiling ed.cpp
compiling em.cpp
compiling kb.cpp
compiling page.cpp
compiling pipe.cpp
compiling rubymain.cpp
rubymain.cpp:220:3: warning: 'rb_rescue' is deprecated: Use of ANYARGS in this function is deprecated [-Wdeprecated-declarations]
                rb_rescue((VALUE (*)(ANYARGS))event_callback, (VALUE)&e, (VALUE (*)(ANYARGS))event_error_handler, Qnil);
                ^
/Users/eric/.rbenv/versions/3.0.0/include/ruby-3.0.0/ruby/backward/cxxanyargs.hpp:244:1: note: 'rb_rescue' has been explicitly marked deprecated here
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
^
/Users/eric/.rbenv/versions/3.0.0/include/ruby-3.0.0/ruby/backward/2/attributes.h:79:35: note: expanded from macro 'RUBY_CXX_DEPRECATED'
#define RUBY_CXX_DEPRECATED(mseg) RBIMPL_ATTR_DEPRECATED((mseg))
                                  ^
/Users/eric/.rbenv/versions/3.0.0/include/ruby-3.0.0/ruby/internal/attr/deprecated.h:32:53: note: expanded from macro 'RBIMPL_ATTR_DEPRECATED'
# define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
                                                    ^
1 warning generated.
compiling ssl.cpp
linking shared-object rubyeventmachine.bundle
Undefined symbols for architecture arm64:
  "_BIO_ctrl", referenced from:
      t_get_peer_cert(unsigned long, unsigned long) in rubymain.o
      _ssl_verify_wrapper in ssl.o
      SslBox_t::CanGetCiphertext() in ssl.o
      SslBox_t::PutPlaintext(char const*, int) in ssl.o
  "_BIO_free", referenced from:
      t_get_peer_cert(unsigned long, unsigned long) in rubymain.o
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
      InitializeDefaultCredentials() in ssl.o
      _ssl_verify_wrapper in ssl.o
  "_BIO_new", referenced from:
      t_get_peer_cert(unsigned long, unsigned long) in rubymain.o
      SslBox_t::SslBox_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, unsigned long) in ssl.o
      _ssl_verify_wrapper in ssl.o
  "_BIO_new_file", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_BIO_new_mem_buf", referenced from:
      InitializeDefaultCredentials() in ssl.o
  "_BIO_read", referenced from:
      SslBox_t::GetCiphertext(char*, int) in ssl.o
  "_BIO_s_mem", referenced from:
      t_get_peer_cert(unsigned long, unsigned long) in rubymain.o
      SslBox_t::SslBox_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, unsigned long) in ssl.o
      _ssl_verify_wrapper in ssl.o
  "_BIO_write", referenced from:
      _ssl_verify_wrapper in ssl.o
      SslBox_t::PutCiphertext(char const*, int) in ssl.o
  "_DH_free", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_EC_KEY_free", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_EC_KEY_new_by_curve_name", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_ERR_print_errors_fp", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
      SslBox_t::SslBox_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, unsigned long) in ssl.o
      SslBox_t::GetPlaintext(char*, int) in ssl.o
  "_EVP_PKEY_free", referenced from:
      InitializeDefaultCredentials() in ssl.o
      SslContext_t::~SslContext_t() in ssl.o
  "_OBJ_sn2nid", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_OPENSSL_init_crypto", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_OPENSSL_init_ssl", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_PEM_read_bio_DHparams", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_PEM_read_bio_PrivateKey", referenced from:
      InitializeDefaultCredentials() in ssl.o
  "_PEM_read_bio_X509", referenced from:
      InitializeDefaultCredentials() in ssl.o
  "_PEM_write_bio_X509", referenced from:
      t_get_peer_cert(unsigned long, unsigned long) in rubymain.o
      _ssl_verify_wrapper in ssl.o
  "_SSL_CIPHER_get_bits", referenced from:
      SslBox_t::GetCipherBits() in ssl.o
  "_SSL_CIPHER_get_name", referenced from:
      SslBox_t::GetCipherName() in ssl.o
  "_SSL_CIPHER_get_version", referenced from:
      SslBox_t::GetCipherProtocol() in ssl.o
  "_SSL_CTX_ctrl", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_SSL_CTX_free", referenced from:
      SslContext_t::~SslContext_t() in ssl.o
  "_SSL_CTX_new", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_SSL_CTX_set_cipher_list", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_SSL_CTX_set_options", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_SSL_CTX_set_session_id_context", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_SSL_CTX_use_PrivateKey", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_SSL_CTX_use_PrivateKey_file", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_SSL_CTX_use_certificate", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_SSL_CTX_use_certificate_chain_file", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_SSL_accept", referenced from:
      SslBox_t::GetPlaintext(char*, int) in ssl.o
  "_SSL_clear", referenced from:
      SslBox_t::~SslBox_t() in ssl.o
  "_SSL_connect", referenced from:
      SslBox_t::SslBox_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, unsigned long) in ssl.o
      SslBox_t::GetPlaintext(char*, int) in ssl.o
  "_SSL_ctrl", referenced from:
      SslBox_t::SslBox_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, unsigned long) in ssl.o
  "_SSL_free", referenced from:
      SslBox_t::~SslBox_t() in ssl.o
  "_SSL_get_current_cipher", referenced from:
      SslBox_t::GetCipherBits() in ssl.o
      SslBox_t::GetCipherName() in ssl.o
      SslBox_t::GetCipherProtocol() in ssl.o
  "_SSL_get_error", referenced from:
      SslBox_t::GetPlaintext(char*, int) in ssl.o
      SslBox_t::PutPlaintext(char const*, int) in ssl.o
  "_SSL_get_ex_data", referenced from:
      _ssl_verify_wrapper in ssl.o
  "_SSL_get_ex_data_X509_STORE_CTX_idx", referenced from:
      _ssl_verify_wrapper in ssl.o
  "_SSL_get_peer_certificate", referenced from:
      SslBox_t::GetPeerCert() in ssl.o
  "_SSL_get_servername", referenced from:
      SslBox_t::GetSNIHostname() in ssl.o
  "_SSL_get_shutdown", referenced from:
      SslBox_t::~SslBox_t() in ssl.o
  "_SSL_is_init_finished", referenced from:
      SslBox_t::GetPlaintext(char*, int) in ssl.o
      SslBox_t::PutPlaintext(char const*, int) in ssl.o
  "_SSL_new", referenced from:
      SslBox_t::SslBox_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, unsigned long) in ssl.o
  "_SSL_read", referenced from:
      SslBox_t::GetPlaintext(char*, int) in ssl.o
  "_SSL_set_bio", referenced from:
      SslBox_t::SslBox_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, unsigned long) in ssl.o
  "_SSL_set_ex_data", referenced from:
      SslBox_t::SslBox_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, unsigned long) in ssl.o
  "_SSL_set_verify", referenced from:
      SslBox_t::SslBox_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, unsigned long) in ssl.o
  "_SSL_shutdown", referenced from:
      SslBox_t::~SslBox_t() in ssl.o
  "_SSL_write", referenced from:
      SslBox_t::PutPlaintext(char const*, int) in ssl.o
  "_TLS_client_method", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_TLS_server_method", referenced from:
      SslContext_t::SslContext_t(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ssl.o
  "_X509_STORE_CTX_get_current_cert", referenced from:
      _ssl_verify_wrapper in ssl.o
  "_X509_STORE_CTX_get_ex_data", referenced from:
      _ssl_verify_wrapper in ssl.o
  "_X509_free", referenced from:
      t_get_peer_cert(unsigned long, unsigned long) in rubymain.o
      InitializeDefaultCredentials() in ssl.o
      SslContext_t::~SslContext_t() in ssl.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [rubyeventmachine.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/eric/.gem/ruby/3.0.0/gems/eventmachine-1.2.7 for inspection.
Results logged to /Users/eric/.gem/ruby/3.0.0/extensions/arm64-darwin-21/3.0.0/eventmachine-1.2.7/gem_make.out
1 gem installed
ruby arm rubygems
4个回答
15
投票

这对我有用:

gem install eventmachine -- --with-openssl-dir=/usr/local/opt/[email protected]

2
投票

我在我的 mac 上解决了这个问题(intel、macos ventura、13.2.1)。

我的电脑上有两个ruby,一个是通过homebrew安装的,一个是系统自带的。 首先使用

which ruby
查看ruby的位置 并使用
brew --prefix ruby
可以看到 homebrew 安装了我们的 ruby。 将其添加到 ~/.zshrc 文件的末尾。我推荐使用homebrew安装的ruby,这样更容易升级。

在 Mac 英特尔上:

if [ -d "/usr/local/opt/ruby/bin" ]; then
  export PATH=/usr/local/opt/ruby/bin:$PATH
  export PATH=`gem environment gemdir`/bin:$PATH
fi

在苹果硅上:

if [ -d "/opt/homebrew/opt/ruby/bin" ]; then
  export PATH=/opt/homebrew/opt/ruby/bin:$PATH
  export PATH=`gem environment gemdir`/bin:$PATH
fi

使用命令加载配置:

source ~/.zshrc

然后继续运行:

bundle install

现在一切正常。


0
投票

Open SSL 答案并没有为我解决这个问题,最终是我没有接受 xCode 许可证。这是特定于 Mac OS Ventura,2023

sudo xcodebuild -license accept

运行后,我可以毫无问题地运行

bundle

我确实想指出我的错误与OP不同:

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
投票

在我安装MacOS 14.0 Sonoma后,这个错误似乎又出现了。

当我执行

bundle exec jekyll serve
时,我收到此错误:

Could not find eventmachine-1.2.7, http_parser.rb-0.6.0, ffi-1.14.2 in any of the sources
Run `bundle install` to install missing gems.

做一个

bundle install
我搞砸了:

Ignoring eventmachine-1.2.7 because its extensions are not built. Try: gem pristine eventmachine --version 1.2.7
Ignoring ffi-1.14.2 because its extensions are not built. Try: gem pristine ffi --version 1.14.2
Ignoring http_parser.rb-0.6.0 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.6.0
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Using public_suffix 4.0.6
Using bundler 2.2.30
Using colorator 1.1.0
Using concurrent-ruby 1.1.8
Fetching eventmachine 1.2.7
Fetching http_parser.rb 0.6.0
Fetching ffi 1.14.2
Using forwardable-extended 2.6.0
Using rb-fsevent 0.10.4
Using kramdown 1.17.0
Using liquid 4.0.3
Using mercenary 0.3.6
Using rouge 3.26.0
Using safe_yaml 1.0.5
Using jekyll-paginate 1.1.0
Using webrick 1.7.0
Using addressable 2.7.0
Using i18n 0.9.5
Using pathutil 0.16.2
Installing http_parser.rb 0.6.0 with native extensions
Installing eventmachine 1.2.7 with native extensions
Installing ffi 1.14.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/david/Projects/_Art/website/Index_v20/vendor/bundle/ruby/2.6.0/gems/eventmachine-1.2.7/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20231008-61076-10zulps.rb
extconf.rb
mkmf.rb can't find header files for ruby at
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

extconf failed, exit code 1

Gem files will remain installed in
/Users/david/Projects/_Art/website/Index_v20/vendor/bundle/ruby/2.6.0/gems/eventmachine-1.2.7 for inspection.
Results logged to
/Users/david/Projects/_Art/website/Index_v20/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-23/2.6.0/eventmachine-1.2.7/gem_make.out

  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:47:in
`block in build'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:295:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:29:in
`build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in `block in
build_extension'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in
`build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in `block in
build_extensions'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/installer.rb:830:in
`build_extensions'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/rubygems_gem_installer.rb:71:in `build_extensions'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/rubygems_gem_installer.rb:28:in `install'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/source/rubygems.rb:200:in `install'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/installer/gem_installer.rb:54:in `install'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/installer/parallel_installer.rb:186:in `do_install'
/Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/installer/parallel_installer.rb:177:in `block in
worker_pool'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/worker.rb:62:in `apply_func'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/worker.rb:57:in `block in process_queue'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/worker.rb:54:in `loop'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/worker.rb:54:in `process_queue'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads'

An error occurred while installing eventmachine (1.2.7), and Bundler cannot continue.

In Gemfile:
  jekyll-sitemap was resolved to 1.4.0, which depends on
    jekyll was resolved to 3.8.4, 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:
/Users/david/Projects/_Art/website/Index_v20/vendor/bundle/ruby/2.6.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20231008-61076-gomt8m.rb
extconf.rb
mkmf.rb can't find header files for ruby at
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

extconf failed, exit code 1

Gem files will remain installed in
/Users/david/Projects/_Art/website/Index_v20/vendor/bundle/ruby/2.6.0/gems/http_parser.rb-0.6.0 for inspection.
Results logged to
/Users/david/Projects/_Art/website/Index_v20/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-23/2.6.0/http_parser.rb-0.6.0/gem_make.out

  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:47:in
`block in build'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:295:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:29:in
`build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in `block in
build_extension'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in
`build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in `block in
build_extensions'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/installer.rb:830:in
`build_extensions'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/rubygems_gem_installer.rb:71:in `build_extensions'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/rubygems_gem_installer.rb:28:in `install'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/source/rubygems.rb:200:in `install'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/installer/gem_installer.rb:54:in `install'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/installer/parallel_installer.rb:186:in `do_install'
/Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/installer/parallel_installer.rb:177:in `block in
worker_pool'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/worker.rb:62:in `apply_func'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/worker.rb:57:in `block in process_queue'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/worker.rb:54:in `loop'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/worker.rb:54:in `process_queue'
  /Users/david/.gem/ruby/2.6.0/gems/bundler-2.2.30/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads'

An error occurred while installing http_parser.rb (0.6.0), and Bundler cannot continue.

In Gemfile:
  jekyll-sitemap was resolved to 1.4.0, which depends on
    jekyll was resolved to 3.8.4, which depends on
      em-websocket was resolved to 0.5.2, which depends on
        http_parser.rb

我想试试这个:

gem install eventmachine -v '1.2.7' -- --with-cppflags=-I/usr/local/opt/openssl/include

但出现此错误:

Ignoring eventmachine-1.2.7 because its extensions are not built. Try: gem pristine eventmachine --version 1.2.7
Ignoring ffi-1.15.4 because its extensions are not built. Try: gem pristine ffi --version 1.15.4
Ignoring ffi-1.14.2 because its extensions are not built. Try: gem pristine ffi --version 1.14.2
Ignoring http_parser.rb-0.6.0 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.6.0
Ignoring sassc-2.4.0 because its extensions are not built. Try: gem pristine sassc --version 2.4.0
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.

作为 MacOS 更新的一部分,xcode 和命令行工具也进行了更新。这是我当前的版本:

% xcodebuild -version 
Xcode 15.0
Build version 15A240d

我想我可能有点不知所措 - 但任何帮助将不胜感激。

© www.soinside.com 2019 - 2024. All rights reserved.