cpanを利用したperlモジュールインストール不具合
perlモジュール(GD::SecurtyImage)を追加しようとcpanを使ってみるも、http://ftp.cpan.jp/ に接続できずにずっとリトライ…
下記、ログとなります。
cpan> install GD;;SecurityImage
CPAN: Storable loaded ok
Going to read /usr/local/bin/yes/Metadata
Database was generated on Wed, 28 Nov 2007 10:36:50 GMT
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
http://ftp.cpan.jp/authors/01mailrc.txt.gz
LWP failed with code[500] message[Can't connect to ftp.cpan.jp:80
(connect: timeout)]
Trying with "/usr/bin/wget -O -" to get
http://ftp.cpan.jp/authors/01mailrc.txt.gz
--14:09:43-- http://ftp.cpan.jp/authors/01mailrc.txt.gz
=> `-'
ftp.cpan.jp
をDNSに問いあわせています... 219.101.183.186
ftp.cpan.jp|219.101.183.186|:80
に接続しています... 失敗しました: 接続がタイムアウトしました.
再試行しています。
--14:12:53-- http://ftp.cpan.jp/authors/01mailrc.txt.gz
(試行: 2) => `-'
ftp.cpan.jp|219.101.183.186|:80
に接続しています... 失敗しました: 接続がタイムアウトしました.
再試行しています。
--14:16:04-- http://ftp.cpan.jp/authors/01mailrc.txt.gz
どうやら、サーバ(ftp.cpan.jp )にアクセスできないようなので別の方法にて対処することに。
検索してみると、ダウンロード先を他のサーバに変更する方法が載ってました。
ためしに別のサーバに変更すると無事インストール完了。
たまにこんなこともあるんでしょうかね。
参考URI
http://linux.kororo.jp/cont/server/clamav.php
インストールできたと思ったら、実はテストではじかれてインストールできなかったぽいです。
強制的にインストールすることもできるようなので、cpanサイトからソースをダウンロードしてきて
/tmpディレクトリに配置解凍。
ダウンロードURI
http://search.cpan.org/~burak/GD-SecurityImage-1.66/
解凍したファイルにあったREADMEを参考にしながら
To install this module type the following:
perl Makefile.PL
make
make test
make install
モジュール一覧からgrepしてみる。
find `perl -e 'print "@INC"'` -name 'GD*.pm' -print
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/GDBM_File.pm
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/GDBM_File.pm
/usr/lib/perl5/site_perl/5.8.5/GD/SecurityImage/GD.pm
/usr/lib/perl5/site_perl/5.8.5/GD/SecurityImage/GD.pm
どうやらインストール完了したらしいです。
かなり大変だった…。
次にさらに困難が、どうもGDモジュールインストールできません。
cpan > install GD
と入力すると。
下記のエラー文がでてきます、意味がわかりません。
Notice: Type perl Makefile.PL -h for command-line option summary.
**UNRECOVERABLE ERROR**
Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher.
If you want to try to compile anyway, please rerun this script with the option --ignore_missing_gd.
Running make test
Make had some problems, maybe interrupted? Won't test
Running make install
Make had some problems, maybe interrupted? Won't install
取り急ぎ、検索でヒットした方法を試してみることに。
GDモジュールに関してもモジュールをダウンロード(GD-2.39)してきて
/tmpディレクトリに配置
make make installにてモジュールをインストール。
CGI::Sessionに関してもGD同様にエラーが。
これもGDと同じように対応。
最終的にはmake make installで何とか強制インストールにて対応できるんだなと…。
ちょいと疲れました。