ページ

2015年5月14日木曜日

RVMで別バージョンのrubyがインストールできない

Why・・・orz

↓こんなんなる
Missing custom packages: homebrew/versions
Missing required packages: autoconf automake libtool pkg-config gcc46 libyaml readline libksba openssl
Skipping homebrew/versions installation, make sure listed software is installed.
Somehow it happened there is no executable 'openssl',
run 'brew doctor' and make sure latest 'openssl' is installed properly.
Requirements installation successful.
Installing Ruby from source to: /Users/{ユーザ名}/.rvm/rubies/ruby-1.9.3-p484, this may take a while depending on your cpu(s)...
ruby-1.9.3-p484 - #downloading ruby-1.9.3-p484, 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 9806k  100 9806k    0     0  6388k      0  0:00:01  0:00:01 --:--:-- 6388k
ruby-1.9.3-p484 - #extracting ruby-1.9.3-p484 to /Users/{ユーザ名}/.rvm/src/ruby-1.9.3-p484.
ruby-1.9.3-p484 - #configuring.
Error running './configure --prefix=/Users/{ユーザ名}/.rvm/rubies/ruby-1.9.3-p484 --without-tcl --without-tk --enable-shared',
showing last 15 lines of /Users/{ユーザ名}/.rvm/log/1431601735_ruby-1.9.3-p484/configure.log
[2015-05-14 20:08:59] ./configure
current path: /Users/{ユーザ名}/.rvm/src/ruby-1.9.3-p484
GEM_HOME=/Users/{ユーザ名}/.rvm/gems/ruby-2.0.0-p353@rails40
PATH=/Users/{ユーザ名}/.rvm/gems/ruby-2.0.0-p353@rails40/bin:/Users/{ユーザ名}/.rvm/gems/ruby-2.0.0-p353@global/bin:/Users/{ユーザ名}/.rvm/rubies/ruby-2.0.0-p353/bin:/Users/{ユーザ名}/.rvm/bin:/usr/bin/apache-ant-1.9.4/bin:/Applications/Android Studio.app/sdk/platform-tools:/Applications/Android Studio.app/sdk/tools:/Applications/adt-bundle-mac/sdk/platform-tools:/usr/local/heroku/bin:/Users/{ユーザ名}/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin
GEM_PATH=/Users/{ユーザ名}/.rvm/gems/ruby-2.0.0-p353@rails40:/Users/{ユーザ名}/.rvm/gems/ruby-2.0.0-p353@global
command(5): ./configure --prefix=/Users/{ユーザ名}/.rvm/rubies/ruby-1.9.3-p484 --without-tcl --without-tk --enable-shared
configure: WARNING: unrecognized options: --without-tcl, --without-tk
checking build system type... i386-apple-darwin14.3.0
checking host system type... i386-apple-darwin14.3.0
checking target system type... i386-apple-darwin14.3.0
checking whether the C compiler works... no
configure: error: in `/Users/{ユーザ名}/.rvm/src/ruby-1.9.3-p484':
configure: error: C compiler cannot create executables
See `config.log' for more details

There has been an error while running configure. Halting the installation.

こんな記事を発見
http://d.hatena.ne.jp/masterpiyo/20111207/1323279751

XCODEが原因と、記事の通りにしてみる
$ rvm install 1.9.3 --with-gcc=clang
Warning, new version of rvm available '1.26.11', you are using older version '1.25.8'.
You can disable this warning with:    echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable  auto-update  with:    echo rvm_autoupdate_flag=2 >> ~/.rvmrc
ruby-1.9.3-p484 - #removing src.
Checking requirements for osx.
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0
Missing required packages: autoconf automake libtool pkg-config libyaml readline libksba openssl
Somehow it happened there is no executable 'openssl',
run 'brew doctor' and make sure latest 'openssl' is installed properly.
Requirements installation successful.
Warning: found user selected compiler 'clang', this will suppress RVM auto detection mechanisms.
Installing Ruby from source to: /Users/{ユーザ名}/.rvm/rubies/ruby-1.9.3-p484, this may take a while depending on your cpu(s)...
ruby-1.9.3-p484 - #downloading ruby-1.9.3-p484, this may take a while depending on your connection...
ruby-1.9.3-p484 - #extracting ruby-1.9.3-p484 to /Users/{ユーザ名}/.rvm/src/ruby-1.9.3-p484.
ruby-1.9.3-p484 - #configuring..............................................
ruby-1.9.3-p484 - #post-configuration.
ruby-1.9.3-p484 - #compiling.............................................................|
ruby-1.9.3-p484 - #installing..............
ruby-1.9.3-p484 - #making binaries executable.
ruby-1.9.3-p484 - #downloading rubygems-2.2.3
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (22) The requested URL returned error: 404 Not Found
The requested url does not exist(22): 'http://production.cf.rubygems.org/rubygems/rubygems-2.2.3.tgz'
Checking fallback: ftp://production.cf.rubygems.org/rubygems/rubygems-2.2.3.tgz
Checking fallback: http://www.mirrorservice.org/sites/production.cf.rubygems.org/rubygems/rubygems-2.2.3.tgz
No fallback URL could be found, try increasing timeout with:

    echo "export rvm_max_time_flag=20" >> ~/.rvmrc

There has been an error while trying to fetch rubygems. 
Halting the installation.
$ rvm list

rvm rubies

   ruby-1.9.3-p484 [ x86_64 ]
=* ruby-2.0.0-p353 [ x86_64 ]
   ruby-2.1.0 [ x86_64 ]

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

#  * - default

でけた?のか
$ rvm 1.9.3
Gemset '' does not exist, 'rvm ruby-1.9.3-p484 do rvm gemset create ' first, or append '--create’.



エラーがっ>< とりあえず指示通りにやってみる
$ rvm 1.9.3@global --create
ruby-1.9.3-p484 - #gemset created /Users/{ユーザ名}/.rvm/gems/ruby-1.9.3-p484@global
ruby-1.9.3-p484 - #importing gemset /Users/{ユーザ名}/.rvm/gemsets/global.gems......-
ruby-1.9.3-p484 - #generating global wrappers.
$ rvm list

rvm rubies

=> ruby-1.9.3-p484 [ x86_64 ]
 * ruby-2.0.0-p353 [ x86_64 ]
   ruby-2.1.0 [ x86_64 ]

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


なんとかできた?

0 件のコメント:

コメントを投稿