rvm Ruby安装期间运行“__rvm_make -j 1”时出错|openssl错误

brqmpdu1  于 2023-08-04  发布在  Ruby
关注(0)|答案(6)|浏览(179)

**您可能正在搜索 * 运行'__rvm_make -j 1'时出错 *

这只是说,编译ruby时出错了。只有当**openssl和/或ossl_ssl**是错误消息的一部分时,此问题才与您相关。
但也许你的问题是一个类似的问题,你可以通过一些自定义来解决你的问题。

背景

今天我想删除一个项目的所有gem,但忘记事先指定bundler的路径,所以所有gem都安装在~/.rvm/gems/ruby-2.2.4/gems/中。
因为它是唯一的ruby2.2.4项目,我认为rm -rf ~/.rvm/gems/ruby-2.2.4/gems/*会非常好。但事实并非如此。Bundler已经消失,gem install bundler也不再工作。
我删除了孔ruby安装与rvm remove ruby-2.2.4蚂蚁试图重新安装它。这是我得到的带有错误的控制台输出:

控制台输出

> rvm install ruby-2.2.4
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.11/x86_64/ruby-2.2.4.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/fkammer/.rvm/rubies/ruby-2.2.4, this may take a while depending on your cpu(s)...
ruby-2.2.4 - #downloading ruby-2.2.4, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12.7M  100 12.7M    0     0   655k      0  0:00:19  0:00:19 --:--:--  234k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.2.4 - #extracting ruby-2.2.4 to /Users/fkammer/.rvm/src/ruby-2.2.4....
ruby-2.2.4 - #configuring..........................................................
ruby-2.2.4 - #post-configuration.
ruby-2.2.4 - #compiling..............................................................
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/fkammer/.rvm/log/1456431932_ruby-2.2.4/make.log
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ossl_ssl.c:19:35: note: expanded from macro 'numberof'
#define numberof(ary) (int)(sizeof(ary)/sizeof((ary)[0]))
                                  ^~~~~
ossl_ssl.c:2217:21: error: invalid application of 'sizeof' to an incomplete type 'const struct (anonymous struct at ossl_ssl.c:115:14) []'
    for (i = 0; i < numberof(ossl_ssl_method_tab); i++) {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ossl_ssl.c:19:35: note: expanded from macro 'numberof'
#define numberof(ary) (int)(sizeof(ary)/sizeof((ary)[0]))
                                  ^~~~~
9 errors generated.
make[2]: *** [ossl_ssl.o] Error 1
make[1]: *** [ext/openssl/all] Error 2
make: *** [build-ext] Error 2
++ return 2
There has been an error while running make. Halting the installation.

字符串
重试不会改变任何东西。我还试图完全卸载RVM(X1 M6 N1 X)并重新安装它,但这两次都没有成功。

系统

Mac OS X - El Capitan(10.11.3)
rvm 1.26.11(最新)
主页0.9.5

j5fpnvbx

j5fpnvbx1#

看来openssl有问题。
rvm在我的安装中使用homebrew作为它的包管理器(我猜这是默认的)。您可以使用rvm autolibs homebrew来确保这一点。
我重新安装了 openssl

brew reinstall openssl

字符串
通过brew list看到我的系统上安装了另一个名为 * openssl 098 * 的openssl包。尝试重新安装它也导致了以下错误:

> brew reinstall openssl098
Error: No available formula with the name "openssl098"


我刚把包裹拿出来

brew uninstall --force openssl098


并重新安装了 openssl,以确保 * openssl 098 * 不是必需的依赖项。但它没有重新安装。
后来我又试着通过rvm安装Ruby-2.2.4,效果很好:)所以我猜我的openssl包因为某种原因坏了。

k3fezbri

k3fezbri2#

帮助我的是:

brew uninstall --ignore-dependencies openssl@3
brew reinstall openssl@1.1
rvm install 3.0.0

字符串

6qfn3psc

6qfn3psc3#

openssl098已经是officially removed,不再可用。最有可能的情况是,您的rvm版本已经过时,它试图针对0.9.8分支进行构建。更新rvm以修复它:rvm get head . Source .

zujrkrfu

zujrkrfu4#

我试图安装Ruby 1.9.3,但出现错误-运行'__rvm_make -j 4'时出错
我关注@mpapis并解决了我的问题

rvm remove 1.9.3
CC=clang rvm install 1.9.3

字符串
现在我有了这个装置-

rvm rubies
   ruby-1.9.3-p551 [ x86_64 ]
   ruby-2.1.3 [ x86_64 ]
=* ruby-2.3.1 [ x86_64 ]

# => - current
# =* - current && default
#  * - default


这里是源链接-https://github.com/rvm/rvm/issues/
&这是我对它的报价-https://github.com/rvm/rvm/issues/2333

knpiaxh1

knpiaxh15#

这就是我的工作。我总是忘记这样做。就一次。

xcode-select --install

字符串

rseugnpd

rseugnpd6#

brew --prefix openssl # get the path you need for openssl

rvm install "ruby-2.6.4" --with-openssl-dir=PATH_TO_OPENSSL

字符串

相关问题