安装ruby 3.2.1 BUILD失败(Ubuntu 22.04使用ruby-build)时出错,依赖项已安装

uhry853o  于 12个月前  发布在  Ruby
关注(0)|答案(1)|浏览(180)

我试图在我的wsl中安装ruby 3.2.1,我使用通过homebrew安装的rbenv,当我尝试rbenv install 3.2.1时,我得到了这个:

Installing ruby-3.2.1...
ruby-build: using readline from homebrew
ruby-build: using libyaml from homebrew
ruby-build: using gmp from homebrew

BUILD FAILED (Ubuntu 22.04 using ruby-build 20230615)

Inspect or clean up the working tree at /tmp/ruby-build.20230628033452.57435.3mGe1n
Results logged to /tmp/ruby-build.20230628033452.57435.log

Last 10 log lines:
Try running `apt-get install -y libssl-dev` to fetch missing dependencies.

Configure options used:
  --prefix=/home/cristian/.rbenv/versions/3.2.1
  --enable-shared
  --with-readline-dir=/home/linuxbrew/.linuxbrew/opt/readline
  --with-libyaml-dir=/home/linuxbrew/.linuxbrew/opt/libyaml
  --with-gmp-dir=/home/linuxbrew/.linuxbrew/opt/gmp
  LDFLAGS=-L/home/cristian/.rbenv/versions/3.2.1/lib
  CPPFLAGS=-I/home/cristian/.rbenv/versions/3.2.1/include

我已经运行了apt-get install -y libssl-dev,但这并没有解决它,我错过了什么?
mos相关日志部分为:

installing bundled gem cache:       /home/cristian/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/cache
The Ruby openssl extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Try running `apt-get install -y libssl-dev` to fetch missing dependencies.

Configure options used:
  --prefix=/home/cristian/.rbenv/versions/3.2.1
  --enable-shared
  --with-readline-dir=/home/linuxbrew/.linuxbrew/opt/readline
  --with-libyaml-dir=/home/linuxbrew/.linuxbrew/opt/libyaml
  --with-gmp-dir=/home/linuxbrew/.linuxbrew/opt/gmp
  LDFLAGS=-L/home/cristian/.rbenv/versions/3.2.1/lib 
  CPPFLAGS=-I/home/cristian/.rbenv/versions/3.2.1/include

我尝试apt-get install -y libssl-devsudo apt install build-essential libssl-dev libreadline-dev zlib1g-dev

pxiryf3j

pxiryf3j1#

我用自制软件成功安装了Ruby 3.2.2
步骤:
/bin/bash -c“$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”
(echo; echo 'eval“$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)”“)>> /home/$USER/.bashrc
eval“$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)”
酿酒师
安装Ruby

相关问题