Sabayon Linuxのパッケージになっているperlはithreadsに対応していないため、ithreads対応にビルドしたperlを別ディレクトリにインストールします。(以下の手順では/opt/local以下にインストールしています。)
$ wget http://www.cpan.org/src/perl-5.10.0.tar.gz
$ sudo mkdir -p /opt/local/bin $ tar xzvf perl-5.10.0.tar.gz $ cd perl-5.10.0
$ sh Configure (以下は[ENTER]キー以外のタイプをする箇所を抜粋しています) Installation prefix to use? (~name ok) [/usr/local] /opt/local Build a threading Perl? [n] y $ make $ make test $ sudo make install $ /opt/local/bin/perl -V Summary of my perl5 (revision 5 version 10 subversion 0) configuration: (中略) useithreads=define usemultiplicity=define ^^^^^^^^^^^^^^^^^^<-これを確認
$ sudo /opt/local/bin/cpan
cpan> install Bundle::CPAN cpan> q
(データが取得できなかった場合の表示) Conld not fetch modules/03modlist.data.gz Going to write /root/.cpan/Metadata Warning: Cannot install Bundle::CPAN, don't know ehat it is. Try the command i /Bundle::CPAN/ to find objects with matching identifiers. cpan> (cpanを終了) cpan> q (設定ファイルを削除) $ sudo rm -rf ./.cpan $ cd /opt/local/lib/perl5/5.10.0/CPAN $ sudo rm -f ./Config.pm* (初期設定をやり直し) $ cd $ sudo /opt/local/bin/cpan
$ sudo /opt/local/bin/cpan (モジュールを順番にインストールします) cpan[2]> install ExtUtils::Depends cpan[3]> install HTML::TokeParser cpan[4]> install ExtUtils::PkgConfig cpan[5]> install Glib cpan[6]> install Cairo (以下の表示(依存性解決)が出ますので、yesをタイプして依存するモジュールをインストールします) ----- Unsatisfied dependencirs detected during ----- ----- TSCH/Cairo-1.044.tar.gz ----- Test::Number::Delta [requires] Shall I follow them and prepend them to the queue of modules we are processing right now? [yes] <-- [ENTER]もしくはyes[ENTER] cpan[7]> install Gtk2 cpan[8]> install Gtk2::GladeXML cpan[9]> install HTTP::Date (以下の表示(依存性解決)が出ますので、yesをタイプして依存するモジュールをインストールします) ----- Unsatisfied dependencirs detected during ----- ----- GAAS/libwww-perl-5.808.tar.gz ----- URI [requires] Shall I follow them and prepend them to the queue of modules we are processing right now? [yes] <-- [ENTER]もしくはyes[ENTER] cpan[10]> q #
$ tar xzvf gnview-0.8.0.tar.gz $ cd gnview-0.8.0 $ sudo mkdir -p /usr/share/gnview $ sudo cp -p gnview.glade 1pix* gnview_*.pl gnview.png /usr/share/gnview $ sudo cp -p gnview.png /usr/share/pixmaps $ sudo cp -p gnview /usr/bin $ sudo chmod 755 /usr/bin/gnview (以下は必要に応じて) $ sudo cp -p gnview.desktop /usr/local/share/applications
(変更前) #!/usr/bin/perl -w (変更後) #!/opt/local/bin/perl -w