地球ウォーカー2

Scala, Python の勉強日記

WindowsでCPANモジュールインストールしようとしてハマったのでメモ

現象

Strawberry Perlをインストール後、
CPANからモジュールをインストールしようとしたらエラーが出た。

C:\>cpan -i XML::Simple

Database was generated on Sat, 26 Sep 2009 13:01:22 GMT
Running install for module 'XML::Simple'
Running make for G/GR/GRANTM/XML-Simple-2.18.tar.gz
Fetching with LWP:
  http://cpan.strawberryperl.com/authors/id/G/GR/GRANTM/XML-Simple-2.18.tar.gz
Fetching with LWP:
  http://cpan.strawberryperl.com/authors/id/G/GR/GRANTM/CHECKSUMS
Checksum for C:\strawberry\cpan\sources\authors\id\G\GR\GRANTM\XML-Simple-2.18.tar.gz ok

  CPAN.pm: Going to build G/GR/GRANTM/XML-Simple-2.18.tar.gz

Checking installed modules ...
XML::SAX is installed, it will be used by the test suite
Checking if your kit is complete...
Looks good
Writing Makefile for XML::Simple
dmake.EXE:  Error: -- \bin\bash: Invalid argument
  GRANTM/XML-Simple-2.18.tar.gz
  C:\strawberry\c\bin\dmake.EXE -- NOT OK
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible

どうやら

dmakeのところでエラーが出ている様子。
環境変数を見てみたら、SHELL"/bin/bash"となっていた。
cygwinをインストールしたときに勝手に設定されていたらしい。

ということで

SHELLを削除したらエラーが出なくなった。
もうcygwinは使っていないのでこれでOK。