LoginSignup
10
7

More than 5 years have passed since last update.

Unicode::Japaneseのインストール失敗をなんとかしてみた

Posted at

Unicode::Japanese を入れようとしたらエラーしたので
その解決策の記録。

大正義cpanmでこける

$ cpanm Unicode::Japanese
Result: FAIL
Failed 4/33 test programs. 5/1456 subtests failed.
make: *** [test_dynamic] エラー 255
-> FAIL Installing Unicode::Japanese failed. See /home/ymko/.cpanm/work/1403711176.7952/build.log for details. Retry with --force to force install it.

素直にbuild.logを見る

build.log

**** CONFIGURE ****
Can't locate ExtUtils/Embed.pm in @INC

 >> It seems we can't compile XS module in this environment.
 >> Reason : the C compiler exited with non-zero status 256
 >> disableXS...

at t/v038_guess_imode2.t line 29.
  is($xs_loaderror, '', "load success");
at t/v041_sjisau.t line 29.
  is($xs_loaderror, '', "load success");

どうやら、XSが無効になっていることでテストがエラーしている様子
具体的にはExtUtils/Embed.pmが無いかららしい。

無ければ入れればいいじゃない?

$ cpanm ExtUtils::Embed
skipping R/RJ/RJBS/perl-5.20.0.tar.gz

なぜか入らない?
ならばローカルにダウンロードして入れてみる。

$ wget http://search.cpan.org/CPAN/authors/id/D/DO/DOUGM/ExtUtils-Embed-1.14.tar.gz
$ cpanm ExtUtils-Embed-1.14.tar.gz
! Installing ExtUtils-Embed-1.14.tar.gz failed. See /home/ymko/.cpanm/work/1403713519.8320/build.log for details. Retry with --force to force install it.

やっぱり入らない。

build.log
Can't locate ExtUtils/Embed.pm in @INC

ビルドの時点で自分自身が必要という矛盾。

# yum install perl-ExtUtils-Embed

再度

$ cpanm Unicode::Japanese
--> Working on Unicode::Japanese
Fetching http://www.cpan.org/authors/id/H/HI/HIO/Unicode-Japanese-0.49.tar.gz ... OK
Configuring Unicode-Japanese-0.49 ... OK
Building and testing Unicode-Japanese-0.49 ... OK
Successfully installed Unicode-Japanese-0.49
1 distribution installed

入りました。以上。

10
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
7