小编jer*_*rth的帖子

为什么我会收到错误“Ruby openssl 扩展未编译错误:Ruby 安装由于缺少扩展而中止”?

当我跑步时

RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl@3/3.0.1 rbenv install 3.1.0

我得到这个输出:

Downloading ruby-3.1.0.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.0.tar.gz
Installing ruby-3.1.0...
ruby-build: using readline from homebrew

BUILD FAILED (macOS 11.6.2 using ruby-build 20211227-3-gcdc215e)

Inspect or clean up the working tree at /var/folders/ts/k_8jb10136s3zw9k2k08nz3c0000gn/T/ruby-build.20220113093111.65052.FVpqjp
Results logged to /var/folders/ts/k_8jb10136s3zw9k2k08nz3c0000gn/T/ruby-build.20220113093111.65052.log

Last 10 log lines:
The Ruby openssl extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Configure options used:
  --prefix=/Users/jeremy/.rbenv/versions/3.1.0
  --enable-shared
  --with-readline-dir=/usr/local/opt/readline
  --with-openssl-dir=/usr/local/Cellar/openssl@3/3.0.1
  CC=clang
  LDFLAGS=-L/Users/jeremy/.rbenv/versions/3.1.0/lib
  CPPFLAGS=-I/Users/jeremy/.rbenv/versions/3.1.0/include
Run Code Online (Sandbox Code Playgroud)

我在日志中没有看到任何线索。我尝试了很多事情,例如重新安装 rbenv 和 openssl、不指定配置选项、系统更新、安装 xcode 以及来自 google 的更多内容。也许我错过了一些东西。

ruby homebrew openssl rbenv ruby-build

7
推荐指数
1
解决办法
5520
查看次数

标签 统计

homebrew ×1

openssl ×1

rbenv ×1

ruby ×1

ruby-build ×1