无法在MacOS上安装任何带RVM的Ruby 10.14.2 Mojave:运行'__rvm_make -j4'时出错

问题描述 投票:6回答:3

将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/[email protected]/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或[email protected],或者卸载所有这些

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

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

ruby xcode rvm macos-mojave
3个回答
3
投票

我也遇到过这个问题。在我的情况下,由于我升级到(MacOS)Mojave后MacPorts已经过时了。

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

关闭并重新开放的航站楼(仅限b / c)

rvm install ruby并得到了Install of ruby-2.6.0 - #complete,万岁!


1
投票

您是否安装了多个版本的boost?我采取了以下步骤来解决这个问题(虽然我使用的是rbenv)。

首先,我删除了我的xcode lib:rm -rf /Library/Developer/CommandLineTools

然后我重新安装它:xcode-select --install

然后我跑了brew ls并注意到我有两个版本的提升。 boost[email protected]。我删除了[email protected]boost并重新安装boost并确保它通过brew link boost链接。

之后似乎工作了。


0
投票

我终于能够通过完全删除(非常旧的版本)MacPorts来修复它。其他一切都给了我同样的问题。

希望这也适合你。我花了一天多的时间才找到一条引导我到这一点的暗示。

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