Apr 232012
 

예전에 만들었던 perl 프로그램을 실행했더니 아래와 같은 오류가 발생을 했습니다.
아마도 시스템에 기존에 패키지로 설치되었던 perl module이 upgrade가 되면서 발생된 이슈입니다.

관련된 모듈은 패키지로 설치되지 않고, CPAN Module을 통해서 설치된 모듈이라서 아래와 같은 현상이 발견이 되었습니다.

[root@localhost message]# perl xxx.pl
File::Temp version 0.18 required--this is only version 0.16 at /usr/lib/perl5/site_perl/5.8.8/MIME/Tools.pm line 14.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/MIME/Tools.pm line 14.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.8/MIME/Parser.pm line 140.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/MIME/Parser.pm line 140.
Compilation failed in require at xxx.pl line 6.
BEGIN failed--compilation aborted at xxx.pl line 6.

이런 경우에는 CPAN 모듈을 어떻게 업데이트를 할까 고민을 하다가 그냥 기존 설치된 모듈을 다시 설치를 하니 업데이트가 되더군요.
아래아 같이 기존의 CPAN 모듈 업데이트 방법으로 설치를 하면 됩니다.

[root@localhost message]# perl -MCPAN -e shell
Terminal does not support AddHistory.

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

cpan> install File::Temp
Plugin from the creators of Brindes :: More at Plulz Wordpress Plugins