/usr/local/lib/ruby/1.9.1/yaml.rb:56:in `
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
まずlibyamlがないって言われたのでインストール。
$ wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
$ tar -zxvf yaml-0.1.4.tar.gz
$ cd yaml-0.1.4
$ ./configure
$ make
$ make install
再びrubyをconfigure;make;make install;
それでgemのインストールを再び試みました。
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
警告が消えたが、エラーが消えない。。。
どうやらzlibがないらしい。
$ sudo apt-get install zlib
しかしすでにインストールされてたようだ。
読み込めていないらしい。(cannot loadですから...w)
ちょっとググって発見。
【追記】再びubuntuが事故ったので備忘録を見ながらrubyをインストールしていたらココで詰まった....。zlibパッケージのインストールが書いてなかったので追記します...(^^;)
こちらで発見。
ubuntu11.10+ruby1.9.3+rails3.1.1+sqlite3環境構築まとめ
http://nmksb.seesaa.net/article/233665516.html
まずaptitudeをインストールする。
$ sudo apt-get install aptitude
インストールが終わったらaptitudeを使ってzlibをインストール。
$ sudo aptitude install zlib1g-dev
これでzlibのインストールが完了。(ここまで追記)
それで次を実行してmakefileを作成。
$ cd ruby-1.9.3-p194/ext/zlib
$ ruby extconf.rb
こんな感じに返ってきたらおーけー。
checking for deflateReset() in -lz... yes
checking for zlib.h... yes
checking for kind of operating system... Unix
checking for crc32_combine() in zlib.h... yes
checking for adler32_combine() in zlib.h... yes
creating Makefile
階層を戻って再びコンパイル。
$ ./configure
$ make
$ make install
これでいいみたい。
もっかいgemのインストールを試す。
$ sudo gem install ....
Fetching: .... (100%)
できた!!!
これで解決。
鯖にrubyがやっと入った。。。