さくらインターネットにhpricotをいれる
ruby-gemsも入ったことだし、hpricotを入れとこう、と思い、
%gem18 install hpricot
と入れると、なにやら下のようなエラー
Building native extensions. This could take a while... ERROR: Error installing hpricot: ERROR: Failed to build gem native extension. /usr/local/bin/ruby18 extconf.rb install hpricot checking for main() in -lc... yes creating Makefile make cc -I. -I. -I/usr/local/lib/ruby/1.8/i386-freebsd6 -I. -fPIC -O2 -fno-strict-aliasing -pipe -fPIC -c hpricot_scan.c cc -I. -I. -I/usr/local/lib/ruby/1.8/i386-freebsd6 -I. -fPIC -O2 -fno-strict-aliasing -pipe -fPIC -c hpricot_gram.c cc -shared -o hpricot_scan.so hpricot_scan.o hpricot_gram.o -L. -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-soname,hpricot_scan.so -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -lruby18 -lc -lcrypt -lm -rpath=/usr/lib:/usr/local/lib -pthread -lc make install /usr/bin/install -c -o root -g wheel -m 0755 hpricot_scan.so /home/pancakeplan/lib/ruby/gem/gems/hpricot-0.6.164/lib/universal-java1.6 install: /home/pancakeplan/lib/ruby/gem/gems/hpricot-0.6.164/lib/universal-java1.6/hpricot_scan.so: chown/chgrp: Operation not permitted *** Error code 71 Stop in /home/pancakeplan/lib/ruby/gem/gems/hpricot-0.6.164/ext/hpricot_scan. Gem files will remain installed in /home/pancakeplan/lib/ruby/gem/gems/hpricot-0.6.164 for inspection. Results logged to /home/pancakeplan/lib/ruby/gem/gems/hpricot-0.6.164/ext/hpricot_scan/gem_make.out
むん…。よく分からないので、google先生にエラーを丸投げ。と、
Ruby | JAM☆ぱん
のような記事。あー…と、分からんが、
setenv RB_USER_INSTALL true
と実行した後に、もう一度gem installをやると
Building native extensions. This could take a while... Successfully installed hpricot-0.6.164 1 gem installed Installing ri documentation for hpricot-0.6.164... Installing RDoc documentation for hpricot-0.6.164...
できました。ネットがないとプログラムなんて無理だね、と思う次第。ありがとうございました。