带有 Bundle Install eventmachine 的 MacOS Ventura13.3 卡在失败循环中

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

有多个与此类似的帐户,但这里发生了一些不同的事情。我在这里写了这个问题.

这里是背景资料:

$  which ruby                                                                                                
/Users/johnlarkin/.rvm/rubies/ruby-3.1.3/bin/ruby
$  ruby -v
ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]
$  which openssl
/opt/homebrew/opt/openssl@3/bin/openssl
$  openssl version                                                                                           
OpenSSL 3.1.0 14 Mar 2023 (Library: OpenSSL 3.1.0 14 Mar 2023)

我可以像这样安装

eventmachine

$  gem install eventmachine -v '1.2.7' -- --with-ssl-dir=/opt/homebrew/opt/openssl@3
Building native extensions with: '--with-ssl-dir=/opt/homebrew/opt/openssl@3'
This could take a while...
Successfully installed eventmachine-1.2.7
Parsing documentation for eventmachine-1.2.7
Done installing documentation for eventmachine after 0 seconds
1 gem installed

然而,当我去

bundle install
时,还是不行:

                                                   ^
4 warnings generated.
linking shared-object rubyeventmachine.bundle
Undefined symbols for architecture arm64:
  "_SSL_get1_peer_certificate", referenced from:
      SslBox_t::GetPeerCert() 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/johnlarkin/Desktop/Coding_Learning/github_files/johnlarkin1.github.io/vendor/bundle/ruby/3.1.0/gems/eventmachine-1.2.7
for inspection.
Results logged to
/Users/johnlarkin/Desktop/Coding_Learning/github_files/johnlarkin1.github.io/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-22/3.1.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-sleek was resolved to 0.1.9, which depends on
    jekyll-seo-tag was resolved to 2.8.0, which depends on
      jekyll was resolved to 3.9.2, which depends on
        em-websocket was resolved to 0.5.3, which depends on
          eventmachine

有人有什么想法吗?

ruby rubygems bundler eventmachine
1个回答
0
投票

非常感谢@tadman 提供的有用建议。问题出在

bundle config settings
link

似乎由于早期不正确的命令规范,有关构建过程的某些内容已被缓存。

我跑了:

$  bundle config build.eventmachine --with-ssl-dir=/opt/homebrew/opt/openssl@3 

You are replacing the current global value of build.eventmachine,
which is currently "--with-cppflags=-I/opt/homebrew/opt/openssl@3/include"

完成此操作后,

bundle install
开始完全正常工作。再次感谢@tadman!

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