2009年10月26日月曜日
CPANで苦労してみたり

先日のエントリは言わばテストであって、本日本番環境へインストールを試みたワケです。

今日はこのあたりのサイトを参考にさせていただきました。
[ヅラド] FTP が利用できない環境で Perl CPAN の環境を設定する on Linux
http://www.nilab.info/zurazure2/000246.html

CPANのダウンロードサイトにローカルを追加する - azrizの日記
http://d.hatena.ne.jp/azriz/20090815/1250311032#


まずはCPANを実行する。

$ perl -MCPAN -e shell
We have to reconfigure CPAN.pm due to following uninitialized parameters:

cpan_home, keep_source_where, build_dir, build_cache, scan_cache, index_expire, gzip, tar, unzip, make, pager, makepl_arg, make_arg, make_install_arg, urllist, inhibit_startup_message, ftp_proxy, http_proxy, no_proxy, prerequisites_policy, cache_metadata

/usr/lib/perl5/5.8.5/CPAN/Config.pm initialized.
(以下省略)


問題はこのあと。
Your ftp_proxy?  
Your http_proxy?
Your no_proxy?
You have no /root/.cpan/sources/MIRRORED.BY
I'm trying to fetch one
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz
Fetching with Net::FTP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
Fetching with Net::FTP
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz

Trying with "/usr/bin/links -source" to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
ERROR at dump.c:188: Receive timeout


タイムアウト?

どうもftp.perl.orgが死んでるらしい。
ってことで、FTPをCtrl+cで中断して、別のサイト(http)を追加してみる。
ftp.perl.org|163.143.1.21|:21 に接続しています... Issuing "/usr/kerberos/bin/ftp -n"

Not connected.
Local directory now /root/.cpan/sources
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Bad luck... Still failed!
Can't access URL ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.

Please check, if the URLs I found in your configuration file () are valid.
The urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/'

Could not fetch MIRRORED.BY
CPAN.pm needs at least one URL where it can fetch CPAN files from.

Please enter your CPAN site: [] http://ftp.cpan.jp/
Enter another URL or RETURN to quit: []
New set of picks:
http://ftp.cpan.jp/


commit: wrote /usr/lib/perl5/5.8.5/CPAN/Config.pm
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.7601)
ReadLine support available (try 'install Bundle::CPAN')

cpan>


http://ftp.cpan.jp/を選んだのは、特に意味はない。調べてみたら、一番多く出てくるのできっと使えるサイトなのだろうと思った程度。

心配なので、テストインストールしてみる。
cpan> test GD
CPAN: Storable loaded ok
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 (Bad hostname 'ftp.cpan.jp')]

Trying with "/usr/bin/links -source" to get
http://ftp.cpan.jp/authors/01mailrc.txt.gz
ERROR at dump.c:188: Host not found

System call "/usr/bin/links -source "http://ftp.cpan.jp/authors/01mailrc.txt.gz" > /root/.cpan/sources/authors/01mailrc.txt"
returned status 1 (wstat 256)
Warning: expected file [/root/.cpan/sources/authors/01mailrc.txt.gz] doesn't exist

Trying with "/usr/bin/wget -O -" to get
http://ftp.cpan.jp/authors/01mailrc.txt.gz
--13:10:55-- http://ftp.cpan.jp/authors/01mailrc.txt.gz
=> `-'
ftp.cpan.jp をDNSに問いあわせています... 失敗しました: 名前またはサービスが不明です.

System call "/usr/bin/wget -O - "http://ftp.cpan.jp/authors/01mailrc.txt.gz" > /root/.cpan/sources/authors/01mailrc.txt"
returned status 1 (wstat 256)
Warning: expected file [/root/.cpan/sources/authors/01mailrc.txt.gz] doesn't exist
Please check, if the URLs I found in your configuration file
(http://ftp.cpan.jp/) are valid. The urllist can be edited. E.g. with 'o
conf urllist push ftp://myurl/'

Could not fetch authors/01mailrc.txt.gz
Fetching with LWP:
http://ftp.cpan.jp/modules/02packages.details.txt.gz
LWP failed with code[500] message[Can't connect to ftp.cpan.jp:80 (Bad hostname 'ftp.cpan.jp')]

Trying with "/usr/bin/links -source" to get
http://ftp.cpan.jp/modules/02packages.details.txt.gz
ERROR at dump.c:188: Host not found

System call "/usr/bin/links -source "http://ftp.cpan.jp/modules/02packages.details.txt.gz" > /root/.cpan/sources/modules/02packages.details.txt"
returned status 1 (wstat 256)
Warning: expected file [/root/.cpan/sources/modules/02packages.details.txt.gz] doesn't exist

Trying with "/usr/bin/wget -O -" to get
http://ftp.cpan.jp/modules/02packages.details.txt.gz
--13:10:58-- http://ftp.cpan.jp/modules/02packages.details.txt.gz
=> `-'
ftp.cpan.jp をDNSに問いあわせています... 失敗しました: 名前またはサービスが不明です.

System call "/usr/bin/wget -O - "http://ftp.cpan.jp/modules/02packages.details.txt.gz" > /root/.cpan/sources/modules/02packages.details.txt"
returned status 1 (wstat 256)
Warning: expected file [/root/.cpan/sources/modules/02packages.details.txt.gz] doesn't exist
Please check, if the URLs I found in your configuration file
(http://ftp.cpan.jp/) are valid. The urllist can be edited. E.g. with 'o
conf urllist push ftp://myurl/'

Could not fetch modules/02packages.details.txt.gz
Fetching with LWP:
http://ftp.cpan.jp/modules/03modlist.data.gz
LWP failed with code[500] message[Can't connect to ftp.cpan.jp:80 (Bad hostname 'ftp.cpan.jp')]

Trying with "/usr/bin/links -source" to get
http://ftp.cpan.jp/modules/03modlist.data.gz
ERROR at dump.c:188: Host not found

System call "/usr/bin/links -source "http://ftp.cpan.jp/modules/03modlist.data.gz" > /root/.cpan/sources/modules/03modlist.data"
returned status 1 (wstat 256)
Warning: expected file [/root/.cpan/sources/modules/03modlist.data.gz] doesn't exist

Trying with "/usr/bin/wget -O -" to get
http://ftp.cpan.jp/modules/03modlist.data.gz
--13:11:00-- http://ftp.cpan.jp/modules/03modlist.data.gz
=> `-'
ftp.cpan.jp をDNSに問いあわせています... 失敗しました: 名前またはサービスが不明です.

System call "/usr/bin/wget -O - "http://ftp.cpan.jp/modules/03modlist.data.gz" > /root/.cpan/sources/modules/03modlist.data"
returned status 1 (wstat 256)
Warning: expected file [/root/.cpan/sources/modules/03modlist.data.gz] doesn't exist
Please check, if the URLs I found in your configuration file
(http://ftp.cpan.jp/) are valid. The urllist can be edited. E.g. with 'o
conf urllist push ftp://myurl/'

Could not fetch modules/03modlist.data.gz
Going to write /root/.cpan/Metadata
Warning: Cannot test GD, don't know what it is.
Try the command

i /GD/

to find objects with matching identifiers.

cpan>


ftp.cpan.jpはダメってこと!?

んじゃぁ、つなぎに行く先を変更したり増やしたりしないといかんなぁ。

対象のサイトはCPAN/SITESからピックアップ。出来ればhttpね。

CPAN/SITES
http://www.perl.com/CPAN/SITES.html


cpan> o conf urllist
urllist
http://ftp.cpan.jp/
Type 'o conf' to view configuration edit options


cpan> o conf urllist unshift http://ftp.jaist.ac.jp/pub/CPAN/

cpan> o conf urllist
urllist
http://ftp.jaist.ac.jp/pub/CPAN/
http://ftp.cpan.jp/
Type 'o conf' to view configuration edit options


cpan>


追加した後に、再度installしてみる(テストすべきでしたね)。

cpan> install GD
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Warning: Found only 0 objects in /root/.cpan/Metadata
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
http://ftp.jaist.ac.jp/pub/CPAN/authors/01mailrc.txt.gz
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
Fetching with LWP:
http://ftp.jaist.ac.jp/pub/CPAN/modules/02packages.details.txt.gz
Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
Database was generated on Mon, 26 Oct 2009 02:30:16 GMT

There's a new CPAN.pm version (v1.9402) available!
[Current version is v1.7601]
You might want to try
install Bundle::CPAN
reload cpan
without quitting the current session. It should be a seamless upgrade
while we are running...
(以下省略)


無事、入りました。

確認したサイトとともに、メモを残しておきます。



0 コメント | コメントを書く
Template Design: © 2007 Envy Inc.