cpan 모듈이 @INC에 등록된 디렉토리에 있음에도 못 찾는 이유

sephiron의 이미지

/usr/lib/perl5/site_perl/5.10/i686-cygwin/ 이 @INC에 포함되어 있는데도 /usr/lib/perl5/site_perl/5.10/i686-cygwin/Math/Factor/XS.pm 모듈을 로드하지 못하는 이유가 무엇인가요?

use Math::Factor::XS ':all';
위 코드를 실행시키니,

$ perl /cygdrive/c/Documents\ and\ Settings/sephiron/src/tmp2.pl
Can't locate loadable object for module Math::Factor::XS in @INC (@INC contains
 /usr/lib/perl5/5.10/i686-cygwin /usr/lib/perl5/5.10 /usr/lib/perl5/site_perl/5
10/i686-cygwin /usr/lib/perl5/site_perl/5.10 /usr/lib/perl5/vendor_perl/5.10/i6
6-cygwin /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/vendor_perl/5.10 /usr/l
b/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at /cygdrive/c/Document
 and Settings/sephiron/src/tmp2.pl line 1

이런 컴파일 에러가 뜹니다. 그래서 모듈의 정보를 확인해 보니

Module id = Math::Factor::XS
    CPAN_USERID  SCHUBIGER (Steven Schubiger (stsc) <schubiger@cpan.org>)
    CPAN_VERSION 0.35
    CPAN_FILE    S/SC/SCHUBIGER/Math-Factor-XS-0.35.tar.gz
    UPLOAD_DATE  2008-02-03
    MANPAGE      Math::Factor::XS - Factorise numbers and calculate matching multiplications
    INST_FILE    /usr/lib/perl5/site_perl/5.10/i686-cygwin/Math/Factor/XS.pm
    INST_VERSION 0.35

이고 실제 XS.pm파일은 /usr/lib/perl5/site_perl/5.10/i686-cygwin/Math/Factor/에 설치되어 있었습니다.

Math안의 다른 모듈은 정상작동하더군요. 이유가 뭘까요? cpan에서 force install로 깔았습니다만.

aero의 이미지

제가 테스트로 설치해봤는데 cpan 명령프롬프트 상에서
install Math::Factor::XS 로 설치하니 무슨 이유에선지 몰라도 test과정에서 실패하는군요
CPAN모듈은 아시겠지만
make
make test
make install
과정을 거치며 test과정에서 실패하면 모듈을 설치하지 않습니다. 여기서 그냥 무시하고
force install 로 설치하면 나중에 문제가 생길 수 있습니다.
cpan에서 모듈을 설치하려고 하면 모듈 소스를
~/.cpan/build/모듈명[임의의uid값] 디렉토리에 풀고 make과정을 진행하는데
해당 디렉토리에 들어가서 수동으로

make Makefile.PL
make
make test
make install

하니깐 제대로 설치가 되네요

아마 이 모듈이 cpan을 통해서 설치하는 과정에 문제가 약간 있는듯 합니다.

sephiron의 이미지

여태까지 삽질했는데 해결은 못 했지만 방향을 잡을 수 있을 것 같습니다. CPAN에 대해 조금 더 깊숙히 이해해야 하겠더군요. 해결되면 내용을 올리겠습니다.^^ 감사합니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.