Installation 如何使用rvm在OS_x10.9上安装ruby 2.1.0?(没有二进制红宝石可用于:osx/10.9/x86_64/ruby)

Installation 如何使用rvm在OS_x10.9上安装ruby 2.1.0?(没有二进制红宝石可用于:osx/10.9/x86_64/ruby),installation,rvm,osx-mavericks,ruby-1.9.3,ruby-2.1,Installation,Rvm,Osx Mavericks,Ruby 1.9.3,Ruby 2.1,我正在尝试安装ruby 1.9.3-p545或ruby-2.1.0或ruby-2.1.1,但失败了 我的环境: OS_X 10.9 x86_64 rvm 1.25.20 来自终端的错误: bmalets$ rvm install 1.9.3-p545 Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.9/x86_64/ruby-1.9.3-p545.

我正在尝试安装ruby 1.9.3-p545或ruby-2.1.0或ruby-2.1.1,但失败了

我的环境:

  • OS_X 10.9 x86_64
  • rvm 1.25.20
来自终端的错误:


bmalets$ rvm install 1.9.3-p545
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.9/x86_64/ruby-1.9.3-p545.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx_port.
Installing macports......................................................bmalets password required for 'make install': 
......................
Installing requirements for osx_port.
Updating system............
Error running 'requirements_osx_port_update_system ruby-1.9.3-p545',
showing last 15 lines of /Users/bmalets/.rvm/log/1394647562_ruby-1.9.3-p545/update_system.log
checking Mac OS X version... 10.9.2
checking Xcode location... /Applications/Xcode.app/Contents/Developer
checking Xcode version... 5.0.2
checking for gcc... /usr/bin/llvm-gcc-4.2
checking whether the C compiler works... no
configure: error: in `/opt/local/var/macports/sources/rsync.macports.org/release/base':
configure: error: C compiler cannot create executables
See `config.log' for more details
shell command "cd /opt/local/var/macports/sources/rsync.macports.org/release/base && CC=/usr/bin/llvm-gcc-4.2 ./configure --prefix=/opt/local --with-tclpackage=/Library/Tcl --with-install-user=root --with-install-group=admin --with-directory-mode=0755 --enable-readline && make && make install" returned error 77
DEBUG: Error installing new MacPorts base: shell command failed (see log for details)
    while executing
"macports::selfupdate [array get global_options] base_updated"
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: shell command failed (see log for details)
++ return 1
++ return 1
Requirements installation failed with status: 1.
请帮忙

附言。 我试图更新我的命令行工具,但也失败了:

我试图更新端口:
sudo-port-v selfupdate
,它要求我提供命令行工具:)


我也有类似的问题。我最终解决了这个问题,尽管我不确定细节。。。图特

  • 从中手动下载最新的命令行工具

  • 安装自制软件

  • 运行
    rvm requirements
    ,它会自动下载一些包

  • 工作!


  • 基于编译器不工作的事实,我检查了/usr/bin/llvm-gcc-4.2是否存在。它没有,但有一个别名/usr/bin/llvm gcc。 因此,我将别名/usr/bin/llvm-gcc复制到:/usr/bin/llvm-gcc-4.2 (此别名指向:/usr/bin/clang)


    在运行rvm requirements之后,我成功地安装了mac端口。

    我遇到了与OP完全相同的问题。在更新命令行工具并重新启动终端后,我按照Bjinse的意见,通过复制文件并运行

    $rvm要求
    (不确定是否需要复制文件)

    然后

    $rvm安装1.9.3

    终于成功了。在下面安装ruby

    $rvm列表

    那我就可以了


    $rvm升级1.9.3p545 ruby 2.1.1

    如果出现错误,终端会显示“rvm不是函数”:

    这样做:

    您需要运行以下命令

    user$ source ~/.rvm/scripts/rvm
    
    然后运行这个

    user$ type rvm | head -n 1
    
    如果你得到

    rvm is a function
    
    问题解决了


    摘自

    我有点像在同一条船上,但我为www.macports.org不再解决这个问题而苦恼。他们没有支付注册费吗?(我应该说,我只是做了Xcode选择--安装,它按预期工作)
    user$ type rvm | head -n 1
    
    rvm is a function