【问题标题】:Can't install Ruby 2.0.0 with rvm无法使用 rvm 安装 Ruby 2.0.0
【发布时间】:2013-03-09 02:20:41
【问题描述】:

我尝试使用 rvm install 2.0.0 安装 Ruby 2.0.0,这是我的输出:

Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p392.
Continuing with compilation. Please read 'rvm mount' to get more information on binary   rubies.
Installing requirements for osx/10.8/x86_64, might require sudo password
Password:
DEBUG: Copying /Users/Family/Library/Preferences/com.apple.dt.Xcode.plist to      /opt/local/var/macports/home/Library/Preferences
DEBUG: MacPorts sources location: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
--->  Updating MacPorts base sources using rsync
receiving file list ... done

sent 36 bytes  received 69 bytes  70.00 bytes/sec
total size is 3594240  speedup is 34230.86
receiving file list ... done

sent 36 bytes  received 76 bytes  224.00 bytes/sec
total size is 512  speedup is 4.57
DEBUG: successful verification with key /opt/local/share/macports/macports-pubkey.pem
DEBUG: /usr/bin/tar -C   /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/tmp -xf /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/base.tar
MacPorts base version 2.1.3 installed,
DEBUG: Rebuilding and reinstalling MacPorts if needed
MacPorts base version 2.1.3 downloaded.
--->  Updating the ports tree
Synchronizing local ports tree from rsync://rsync.macports.org/release/tarballs/ports.tar
DEBUG: /usr/bin/rsync -rtzv --delete-after   rsync://rsync.macports.org/release/tarballs/ports.tar /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
receiving file list ... done

sent 36 bytes  received 70 bytes  212.00 bytes/sec
total size is 55050240  speedup is 519341.89
DEBUG: /usr/bin/rsync -rtzv --delete-after      rsync://rsync.macports.org/release/tarballs/ports.tar.rmd160    /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
receiving file list ... done

sent 36 bytes  received 77 bytes  226.00 bytes/sec
total size is 512  speedup is 4.53
DEBUG: successful verification with key /opt/local/share/macports/macports-pubkey.pem
DEBUG: /usr/bin/tar -C /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/tmp -xf /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports.tar
Creating port index in /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports

Total number of ports parsed:   0 
Ports successfully parsed:  0 
Ports failed:           0 
Up-to-date ports skipped:   16692

--->  MacPorts base is already the latest version
DEBUG: Setting MacPorts sources ownership to root

The ports tree has been updated. To upgrade your installed ports, you should run
port upgrade outdated
Missing required packages: autoconf, automake, libtool, pkg-config, libiconv, libyaml, libffi, readline, libxml2, libxslt, libksba, openssl, curl-ca-bundle, sqlite3, zlib, ncurses, gdbm.
Installing Ruby from source to: /Users/Family/.rvm/rubies/ruby-1.9.3-p392, this may take a       while depending on your cpu(s)...
ruby-1.9.3-p392 - #downloading ruby-1.9.3-p392, this may take a while depending on your connection...
######################################################################## 100.0%
ruby-1.9.3-p392 - #extracting ruby-1.9.3-p392 to /Users/Family/.rvm/src/ruby-1.9.3-p392
ruby-1.9.3-p392 - #extracted to /Users/Family/.rvm/src/ruby-1.9.3-p392
ruby-1.9.3-p392 - #configuring..........
Error running './configure --prefix=/Users/Family/.rvm/rubies/ruby-1.9.3-p392 --disable-     install-doc --without-tcl --without-tk --enable-shared',
please read /Users/Family/.rvm/log/ruby-1.9.3-p392/configure.log
There has been an error while running configure. Halting the installation.

我正在运行 mac osx Mountan Lion。如果我尝试安装 1.9.3,它会做同样的事情 我的问题是什么,我该如何解决?我是 RVM 和 ruby​​ 的新手,所以这可能只是一个简单的错误。在此先感谢

【问题讨论】:

  • 我认为你错过了 please read /Users/Family/.rvm/log/ruby-1.9.3-p392/configure.log 所说的地方。
  • 请发帖/Users/Family/.rvm/log/ruby-1.9.3-p392/configure.log?
  • 这里是 [2013-03-19 21:52:50] ./configure configure: WARNING: unrecognized options: --without-tcl, --without-tk checking build system type... i386-apple-darwin12.2.0 checking host system type... i386-apple-darwin12.2.0 checking target system type... i386-apple-darwin12.2.0 checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in /Users/Family/.rvm/src/ruby-1.9.3-p392':配置:错误:在 $PATH 中找不到可接受的 C 编译器 请参阅 config.log' for more details @高清1
  • 从 App Store 安装 XCode
  • 如果这可以解决您的问题,并且我怀疑它会解决,请告诉我,我会将其发布为其他有相同问题的人的答案。

标签: ruby macos terminal installation rvm


【解决方案1】:

当我在我的 OS X Mountain Lion 上安装 Ruby 2.0 时,我必须确保首先安装了 OpenSSL。因为我使用的是 Homebrew,所以我必须在 rvm install 2.0.0 之前做一个 brew install openssl。看起来您正在运行 Macports(我以前没有使用过),所以我猜 sudo port install openssl 可能适合您。

还尝试安装以下内容:autoconf, automake, libtool, pkg-config, libiconv, libyaml, libffi, readline, libxml2, libxslt, libksba, curl-ca-bundle, sqlite3, zlib, ncurses, gdbm - 它们在您提供的输出中被列为缺失。

【讨论】:

    【解决方案2】:

    通过接下来的步骤,我成功安装了 ruby​​-2.0.0-rc2。

    brew update    
    brew install libyaml libxslt sqlite
    brew upgrade automake libksba openssl pkg-config
    rvm get stable    
    rvm autolibs enable
    rvm install 2.0.0-p0
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-07-11
      • 2013-03-09
      • 2013-07-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多