gpt4 book ai didi

ruby - 无法在 MacOS 10.14.2 Mojave : Error running '__rvm_make -j4' 上使用 RVM 安装任何 Ruby

转载 作者:数据小太阳 更新时间:2023-10-29 07:06:27 24 4
gpt4 key购买 nike

将 MacOS 升级到 10.14.2 Mojave 后,我无法再使用 RVM 安装任何 Ruby 版本。它总是给出这样的错误:

$rvm install 2.5.3
ruby-2.5.3 - #removing src/ruby-2.5.3..
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.14/x86_64/ruby-2.5.3.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/jdinse/.rvm/rubies/ruby-2.5.3, this may take a while depending on your cpu(s)...
ruby-2.5.3 - #downloading ruby-2.5.3, this may take a while depending on your connection...
ruby-2.5.3 - #extracting ruby-2.5.3 to /Users/jdinse/.rvm/src/ruby-2.5.3.....
ruby-2.5.3 - #configuring....................................................................
ruby-2.5.3 - #post-configuration.
ruby-2.5.3 - #compiling....................
Error running '__rvm_make -j4',
please read /Users/jdinse/.rvm/log/1547136259_ruby-2.5.3/make.log

There has been an error while running make. Halting the installation.

查看make.log,唯一的错误是这样的:

making srcs under enc
make[1]: Nothing to be done for `srcs'.
generating transdb.h
linking static-library libruby.2.5.3-static.a
libtool: object: dln.o malformed object (unknown load command 1)
libtool: object: localeinit.o malformed object (unknown load command 1)
libtool: object: loadpath.o malformed object (unknown load command 1)
libtool: object: array.o malformed object (unknown load command 1)
libtool: object: bignum.o malformed object (unknown load command 1)
libtool: object: class.o malformed object (unknown load command 1)
...

到目前为止我尝试了什么:

  • 重新安装 RVM
  • 尝试使用之前的 RVM 1.29.6 或 master 分支
  • 重新安装 Homebrew
  • 重新安装 XCode
  • 重新安装命令行工具
  • 用自制软件安装了 gcc、gcc@7 或 gcc@8,或者全部卸载了
  • 已安装 openssl 或 openssl@1.1,或全部卸载

这和类似问题的任何其他提示都没有帮助。

有什么想法吗?或者知道是什么导致了错误 libtool: object: dln.o malformed object (unknown load command 1) 以及如何修复它?

最佳答案

我也遇到了这个问题。就我而言,这是因为在我升级到 (MacOS) Mojave 后 MacPorts 已过时。

我按照此处 MacPorts 迁移指南中列出的步骤操作: https://trac.macports.org/wiki/Migration

关闭和重新打开终端(仅 b/c)

运行 rvm install ruby​​ 并获得 Install of ruby​​-2.6.0 - #complete,万岁!

关于ruby - 无法在 MacOS 10.14.2 Mojave : Error running '__rvm_make -j4' 上使用 RVM 安装任何 Ruby,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54132958/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com