gpt4 book ai didi

ruby - 是否可以在 OS X Mavericks 上安装 Ruby 1.9.3-p327?如果是这样,怎么办?

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

我正在设置 Mac OS X Mavericks 10.9.3 系统进行开发。

由于其他机器上的一些遗留代码和环境,我需要使用 Ruby 1.9.3-p327。

但是,它没有构建。

我安装了 Xcode 5.1.1 (5B1008) 和命令行工具。

我有 gcc...

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.2.0
Thread model: posix

我得到的错误如下。

有人知道解决这个问题的方法吗?

$ rvm install ruby-1.9.3-p327               
ruby-1.9.3-p327 - #removing src/ruby-1.9.3-p327 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.9/x86_64/ruby-1.9.3-p327.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/opt/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/username/.rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...
ruby-1.9.3-p327 - #extracting ruby-1.9.3-p327 to /Users/username/.rvm/src/ruby-1.9.3-p327 - please wait
ruby-1.9.3-p327 - #applying patch /Users/username/.rvm/patches/ruby/GH-488.patch - please wait
ruby-1.9.3-p327 - #configuring - please wait
ruby-1.9.3-p327 - #post-configuration - please wait
ruby-1.9.3-p327 - #compiling - please wait
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/username/.rvm/log/1400875609_ruby-1.9.3-p327/make.log
f_rational_new_no_reduce1(VALUE klass, VALUE x)
^
6 warnings generated.
compiling re.c
compiling regcomp.c
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
regparse.c:582:15: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
return t->num_entries;
~~~~~~ ~~~^~~~~~~~~~~
1 error generated.
make: *** [regparse.o] Error 1
+__rvm_make:0> return 2
There has been an error while running make. Halting the installation.

我发现 ruby​​-1.9.3-p547 安装没有错误,但我需要其他版本。

最佳答案

如果不需要使用rvm安装这个版本的ruby,可以使用rbenv .我刚刚安装了这个版本,没有任何问题。使用 brew 安装它很容易。

如果不行,那就是其他地方的问题。

关于ruby - 是否可以在 OS X Mavericks 上安装 Ruby 1.9.3-p327?如果是这样,怎么办?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23837842/

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