通过RVM编译在Mac 10.8上安装ruby 1.8.7
我在我的机器上安装老版本的ruby(osx mountain lion)时遇到了问题。我想知道是否有人对如何解决这个问题,编译想法:通过RVM编译在Mac 10.8上安装ruby 1.8.7
$ rvm install 1.8.7
Warning! Requested ruby installation which requires another ruby available - installing ruby-1.8.7-p374 first.
ruby-1.8.7-p374 - #removing src/ruby-1.8.7-p374..
Checking requirements for osx.
Certificates in '/opt/twitter/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/mshahriarinia/.rvm/rubies/ruby-1.8.7-p374, this may take a while depending on your cpu(s)...
ruby-1.8.7-p374 - #downloading ruby-1.8.7-p374, this may take a while depending on your connection...
ruby-1.8.7-p374 - #extracting ruby-1.8.7-p374 to /Users/mshahriarinia/.rvm/src/ruby-1.8.7-p374....
ruby-1.8.7-p374 - #applying patch /Users/mshahriarinia/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch.
ruby-1.8.7-p374 - #applying patch /Users/mshahriarinia/.rvm/patches/ruby/1.8.7/no_sslv2.diff.
ruby-1.8.7-p374 - #applying patch /Users/mshahriarinia/.rvm/patches/ruby/GH-488.patch.
ruby-1.8.7-p374 - #applying patch /Users/mshahriarinia/.rvm/patches/ruby/ssl_no_ec2m.patch.
ruby-1.8.7-p374 - #configuring...............................
ruby-1.8.7-p374 - #post-configuration.
ruby-1.8.7-p374 - #compiling............
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/mshahriarinia/.rvm/log/1489619955_ruby-1.8.7-p374/make.log
numeric.c: In function 'flo_is_finite_p':
numeric.c:1238:5: warning: 'finite' is deprecated (declared at /opt/twitter/Cellar/[email protected]/4.9.4/lib/gcc/4.9/gcc/x86_64-apple-darwin15.6.0/4.9.4/include-fixed/ math.h:772) [-Wdeprecated-declarations]
if (!finite(value))
^
{standard input}:4857:suffix or operands invalid for `movq'
{standard input}:4860:suffix or operands invalid for `movq'
{standard input}:4869:suffix or operands invalid for `movq'
{standard input}:4885:suffix or operands invalid for `movq'
{standard input}:4889:suffix or operands invalid for `movq'
{standard input}:4896:suffix or operands invalid for `movq'
{standard input}:4898:suffix or operands invalid for `movq'
{standard input}:4900:suffix or operands invalid for `movq'
{standard input}:4914:suffix or operands invalid for `movq'
make: *** [numeric.o] Error 1
+++ return 2
There has been an error while running make. Halting the installation.
To proceed rvm requires a ruby-1.8.7-p374 compatible ruby is installed.
We attempted to install it automatically but it failed with status 2.
Please install it manually (or a compatible alternative) to proceed.
貌似问题是与XCODE
。 检查一下您是否过时XCODE
,通过运行:
softwareupdate --list
如果XCODE
是过时请
softwareupdate --install <product name>
否则更新,如果XCODE
缺少运行安装:
xcode-select --install
xcode是最新日期:$ softwareupdate --list 软件更新工具 版权所有2002-2015 Apple Inc. 查找可用软件 没有新的软件可用。 –
不知道你的意思 –
你可以通过在终端运行'open -a Xcode'来获得xcode窗口吗? – harshs08
Ruby 1.8.7已经不存在了,所以在这一点上你可能会遇到很多麻烦。如果你真的需要使用它,在虚拟机上旋转10.7可能会有所帮助。最后一次我必须这样做,我不得不在[Vagrant](http://vagrantup.com)中使用一个非常旧的Linux发行版,甚至那些烦人的,因为你不能再为它们安装软件包,存储库是隔断。有一件事是尝试使用'rbenv'来代替。 – tadman
这个版本没有严格的依赖关系,任何ruby
1.9.3比1.8.7运气好多了。适合您需求的最新版本。 – tadman