rvmでruby1.9.3をインストールしたらエラーが出た。
rvmでruby1.9.3をインストールしようとして、下記コマンドを打ったところ、
rvm install 1.9.3-p125
と言う具合で、エラーが出てインストールできない。
bismar@BISMAR-PC:~/test/myapp$ rvm install 1.9.3-p125 Installing Ruby from source to: /home/bismar/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)... ruby-1.9.3-p125 - #fetching ruby-1.9.3-p125 - #downloading ruby-1.9.3-p125, 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 9505k 100 9505k 0 0 3414k 0 0:00:02 0:00:02 --:--:-- 3820k ruby-1.9.3-p125 - #extracting ruby-1.9.3-p125 to /home/bismar/.rvm/src/ruby-1.9.3-p125 ruby-1.9.3-p125 - #extracted to /home/bismar/.rvm/src/ruby-1.9.3-p125 ruby-1.9.3-p125 - #configuring ruby-1.9.3-p125 - #compiling ruby-1.9.3-p125 - #installing Removing old Rubygems files... -e:1: Use RbConfig instead of obsolete and deprecated Config. Installing rubygems dedicated to ruby-1.9.3-p125... Installing rubygems for /home/bismar/.rvm/rubies/ruby-1.9.3-p125/bin/ruby ERROR: Error running 'GEM_PATH="/home/bismar/.rvm/gems/ruby-1.9.3-p125:/home/bismar/.rvm/gems/ruby-1.9.3-p125@global:/home/bismar/.rvm/gems/ruby-1.9.3-p125:/home/bismar/.rvm/gems/ruby-1.9.3-p125@global" GEM_HOME="/home/bismar/.rvm/gems/ruby-1.9.3-p125" "/home/bismar/.rvm/rubies/ruby-1.9.3-p125/bin/ruby" "/home/bismar/.rvm/src/rubygems-1.6.2/setup.rb"', please read /home/bismar/.rvm/log/ruby-1.9.3-p125/rubygems.install.log WARN: Installation of rubygems did not complete successfully. ruby-1.9.3-p125 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake). ruby-1.9.3-p125 - #importing default gemsets (/home/bismar/.rvm/gemsets/) Install of ruby-1.9.3-p125 - #complete
解決方法として、まずrvmのアップデートを行った。
rvm get latest rvm reload rvm version
しかしエラーがでる。
bismar@BISMAR-PC:~/test/myapp$ rvm get latest Original installed RVM version: rvm 1.6.9 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/] rvm- % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed More details here: http://curl.haxx.se/docs/sslcerts.html curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option. md5sum: /home/bismar/.rvm/archives/rvm-.tar.gz: そのようなファイルやディレクトリはありません tar (child): /home/bismar/.rvm/archives/rvm-.tar.gz: open 不能: そのようなファイルやディレクトリはありません tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now /tmp/29338: 71 行: cd: /home/bismar/.rvm/src/rvm-: そのようなファイルやディレクトリはありません chmod: `./scripts/install' にアクセスできません: そのようなファイルやディレクトリはありません /tmp/29338: 行 75: ./scripts/install: そのようなファイルやディレクトリはありません Installed RVM version: rvm 1.6.9 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]
どうもrvm get latestではなくrvm get headでなければいかないらしい。
rvm get head rvm reload rvm install 1.9.3-p125
ruby1.9.3のインストールを再実行
bismar@BISMAR-PC:~/test/myapp$ rvm remove ruby-1.9.3-p125 Removing /home/bismar/.rvm/src/ruby-1.9.3-p125... Removing /home/bismar/.rvm/rubies/ruby-1.9.3-p125... Removing ruby-1.9.3-p125 aliases... Removing ruby-1.9.3-p125 wrappers... Removing ruby-1.9.3-p125 environments... Removing ruby-1.9.3-p125 binaries... bismar@BISMAR-PC:~/test/myapp$ rvm install ruby-1.9.3-p125 Fetching yaml-0.1.4.tar.gz to /home/bismar/.rvm/archives % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 460k 100 460k 0 0 223k 0 0:00:02 0:00:02 --:--:-- 309k Extracting yaml-0.1.4.tar.gz to /home/bismar/.rvm/src Configuring yaml in /home/bismar/.rvm/src/yaml-0.1.4. Compiling yaml in /home/bismar/.rvm/src/yaml-0.1.4. Installing yaml to /home/bismar/.rvm/usr Installing Ruby from source to: /home/bismar/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)... ruby-1.9.3-p125 - #fetching ruby-1.9.3-p125 - #extracting ruby-1.9.3-p125 to /home/bismar/.rvm/src/ruby-1.9.3-p125 ruby-1.9.3-p125 - #extracted to /home/bismar/.rvm/src/ruby-1.9.3-p125 ruby-1.9.3-p125 - #configuring ruby-1.9.3-p125 - #compiling ruby-1.9.3-p125 - #installing Retrieving rubygems-1.8.24 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 371k 100 371k 0 0 831k 0 --:--:-- --:--:-- --:--:-- 3199k Extracting rubygems-1.8.24 ... Removing old Rubygems files... Installing rubygems-1.8.24 for ruby-1.9.3-p125 ... Installation of rubygems completed successfully. ruby-1.9.3-p125 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake). ruby-1.9.3-p125 - #importing default gemsets (/home/bismar/.rvm/gemsets/) Install of ruby-1.9.3-p125 - #complete
インストール完了!
参考:
http://d.hatena.ne.jp/stog/20110326/1301168745
http://stackoverflow.com/questions/7967723/error-while-installing-ruby-1-9-3