2007/06/01

DreamHostにPerlをインストール

こちらを参考にPerlをインストールしようとしたらこちらと同じエラーに遭遇。 私がPerlに慣れていないせいか、make --ignore-errorsでやってもなんかおかしい。 しょうがないのでまじめに探ってみた結果、どうやらextディレクトリ以下のモジュールをビルドする際のminiperl Makefile.PLがこけてるっぽいことが判明。 なぜかモジュールのMakefileが$HOMEに生成されてたりするし、カレントディレクトリの扱いがおかしくなってるのかしらん。 そこで、一度make --ignore-errorsでインストールしてperlを使えるようにした後に以下のパッチをあてて再度ビルドしたところ、make testもほぼ問題なく通るようになって一安心です。

--- ext/util/make_ext.orig      2002-05-02 16:32:21.000000000 -0700
+++ ext/util/make_ext   2007-06-01 04:24:43.000000000 -0700
@@ -119,7 +119,7 @@
 esac

 if test ! -f $makefile ; then
-       test -f Makefile.PL && ../$depth/miniperl -I../$depth/lib Makefile.PL INSTALLDIRS=perl PERL_CORE=1 $passthru
+       test -f Makefile.PL && $HOME/local/bin/perl -I../$depth/lib Makefile.PL INSTALLDIRS=perl PERL_CORE=1 $passthru
 fi
 if test ! -f $makefile ; then
        if test -f Makefile.SH; then

【追記】
詳細手順は以下の通り。

  • $ tar xvfz perl-5.8.8.tar.gz
  • $ cd perl-5.8.8
  • $ ./Configure -d -D prefix=$HOME/local
  • $ make --ignore-errors
  • $ make --ignore-errors install
  • $ export PATH=$HOME/local/bin:$PATH
  • $ export PERL5LIB=$HOME/local/lib/perl5/5.8.8:$HOME/local/lib/perl5/site_perl/5.8.8
  • $ vi ext/util/make_ext
  • $ make clean
  • $ make
  • $ make test
  • $ make install

0 comments: