2013-03-14 1 views
2

Perl에 대한 초보자 비트입니다. 커맨드 프롬프트를 통해 내 Windows 7 PC에 CPAN의 모듈 몇 개를 설치했지만 Math :: Random을 설치할 때 벽돌 벽에 부딪 혔습니다. 여기서 무슨 일이 일어나고 있는지 확실하지 않습니다. 나는 쓸모있는 시간 동안 인터넷 검색을 시도했다. 다음은 내가 얻은 것입니다 ...모듈을 설치할 때 "메모리 위치에 잘못된 액세스"가 발생했습니다.

cpan> install Math::Random 
    Database was generated on Thu, 14 Mar 2013 15:15:50 GMT 
    Running install for module 'Math::Random' 
    Running make for G/GR/GROMMEL/Math-Random-0.71.tar.gz 
    Fetching with LWP: 
    http://cpan.strawberryperl.com/authors/id/G/GR/GROMMEL/Math-Random-0.71.tar.gz 
    Checksum for C:\strawberry\cpan\sources\authors\id\G\GR\GROMMEL\Math-Random-0.71 
    .tar.gz ok 
    Scanning cache C:\strawberry\cpan\build for sizes 
    ............................................................................DONE 

    Invalid header block at offset unknown at C:\strawberry\perl\lib/CPAN/Tarzip.pm 
    line 365. 
    Invalid header block at offset unknown at C:\strawberry\perl\lib/CPAN/Tarzip.pm 
    line 365. 
    Invalid header block at offset unknown at C:\strawberry\perl\lib/CPAN/Tarzip.pm 
    line 365. 
    Invalid header block at offset unknown at C:\strawberry\perl\lib/CPAN/Tarzip.pm 
    line 365. 
    Invalid header block at offset unknown at C:\strawberry\perl\lib/CPAN/Tarzip.pm 
    line 365. 
    Invalid header block at offset unknown at C:\strawberry\perl\lib/CPAN/Tarzip.pm 
    line 365. 
    Invalid header block at offset unknown at C:\strawberry\perl\lib/CPAN/Tarzip.pm 
    line 365. 
    Invalid header block at offset unknown at C:\strawberry\perl\lib/CPAN/Tarzip.pm 
    line 365. 

     CPAN.pm: Building G/GR/GROMMEL/Math-Random-0.71.tar.gz 

    Checking if your kit is complete... 
    Looks good 
    Writing Makefile for Math::Random 
    Writing MYMETA.yml and MYMETA.json 
    cp test2.pl blib\lib\Math\test2.pl 
    cp Random.pm blib\lib\Math\Random.pm 
    AutoSplitting blib\lib\Math\Random.pm (blib\lib\auto\Math\Random) 
    cp test1.pl blib\lib\Math\test1.pl 
    cp example.pl blib\lib\Math\example.pl 
    C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp -typemap 
    C:\strawberry\perl\lib\ExtUtils\typemap Random.xs > Random.xsc && C:\strawberr 
    y\perl\bin\perl.exe -MExtUtils::Command -e mv -- Random.xsc Random.c 
    gcc -c   -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT - 
    DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -s -O2  -DVERSION=\"0. 
    71\" -DXS_VERSION=\"0.71\" "-IC:\strawberry\perl\lib\CORE" Random.c 
    gcc -c   -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT - 
    DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -s -O2  -DVERSION=\"0. 
    71\" -DXS_VERSION=\"0.71\" "-IC:\strawberry\perl\lib\CORE" com.c 
    gcc -c   -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT - 
    DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -s -O2  -DVERSION=\"0. 
    71\" -DXS_VERSION=\"0.71\" "-IC:\strawberry\perl\lib\CORE" helper.c 
    gcc -c   -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT - 
    DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -s -O2  -DVERSION=\"0. 
    71\" -DXS_VERSION=\"0.71\" "-IC:\strawberry\perl\lib\CORE" linpack.c 
    gcc -c   -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT - 
    DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -s -O2  -DVERSION=\"0. 
    71\" -DXS_VERSION=\"0.71\" "-IC:\strawberry\perl\lib\CORE" randlib.c 
    Running Mkbootstrap for Math::Random() 
    C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e chmod -- 644 Random.bs 
    C:\strawberry\perl\bin\perl.exe -MExtUtils::Mksymlists \ 
     -e "Mksymlists('NAME'=>\"Math::Random\", 'DLBASE' => 'Random', 'DL_FUNCS' = 
    > { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" 
    dlltool --def Random.def --output-exp dll.exp 
    g++ -o blib\arch\auto\Math\Random\Random.dll -Wl,--base-file -Wl,dll.base -mdll 
    -s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib" Random.o  com.o 
    helper.o  linpack.o  randlib.o C:\strawberry\perl\lib\CORE\libperl5 
    16.a C:\strawberry\c\i686-w64-mingw32\lib\libm.a C:\strawberry\c\i686-w64-mingw3 
    2\lib\libmoldname.a C:\strawberry\c\i686-w64-mingw32\lib\libkernel32.a C:\strawb 
    erry\c\i686-w64-mingw32\lib\libuser32.a C:\strawberry\c\i686-w64-mingw32\lib\lib 
    gdi32.a C:\strawberry\c\i686-w64-mingw32\lib\libwinspool.a C:\strawberry\c\i686- 
    w64-mingw32\lib\libcomdlg32.a C:\strawberry\c\i686-w64-mingw32\lib\libadvapi32.a 
    C:\strawberry\c\i686-w64-mingw32\lib\libshell32.a C:\strawberry\c\i686-w64-ming 
    w32\lib\libole32.a C:\strawberry\c\i686-w64-mingw32\lib\liboleaut32.a C:\strawbe 
    rry\c\i686-w64-mingw32\lib\libnetapi32.a C:\strawberry\c\i686-w64-mingw32\lib\li 
    buuid.a C:\strawberry\c\i686-w64-mingw32\lib\libws2_32.a C:\strawberry\c\i686-w6 
    4-mingw32\lib\libmpr.a C:\strawberry\c\i686-w64-mingw32\lib\libwinmm.a C:\strawb 
    erry\c\i686-w64-mingw32\lib\libversion.a C:\strawberry\c\i686-w64-mingw32\lib\li 
    bodbc32.a C:\strawberry\c\i686-w64-mingw32\lib\libodbccp32.a C:\strawberry\c\i68 
    6-w64-mingw32\lib\libcomctl32.a dll.exp 
    dlltool --def Random.def --base-file dll.base --output-exp dll.exp 
    g++ -o blib\arch\auto\Math\Random\Random.dll -mdll -s -L"C:\strawberry\perl\lib\ 
    CORE" -L"C:\strawberry\c\lib" Random.o com.o helper.o  linpack.o 
    randlib.o C:\strawberry\perl\lib\CORE\libperl516.a C:\strawberry\c\i686-w64-mi 
    ngw32\lib\libm.a C:\strawberry\c\i686-w64-mingw32\lib\libmoldname.a C:\strawberr 
    y\c\i686-w64-mingw32\lib\libkernel32.a C:\strawberry\c\i686-w64-mingw32\lib\libu 
    ser32.a C:\strawberry\c\i686-w64-mingw32\lib\libgdi32.a C:\strawberry\c\i686-w64 
    -mingw32\lib\libwinspool.a C:\strawberry\c\i686-w64-mingw32\lib\libcomdlg32.a C: 
    \strawberry\c\i686-w64-mingw32\lib\libadvapi32.a C:\strawberry\c\i686-w64-mingw3 
    2\lib\libshell32.a C:\strawberry\c\i686-w64-mingw32\lib\libole32.a C:\strawberry 
    \c\i686-w64-mingw32\lib\liboleaut32.a C:\strawberry\c\i686-w64-mingw32\lib\libne 
    tapi32.a C:\strawberry\c\i686-w64-mingw32\lib\libuuid.a C:\strawberry\c\i686-w64 
    -mingw32\lib\libws2_32.a C:\strawberry\c\i686-w64-mingw32\lib\libmpr.a C:\strawb 
    erry\c\i686-w64-mingw32\lib\libwinmm.a C:\strawberry\c\i686-w64-mingw32\lib\libv 
    ersion.a C:\strawberry\c\i686-w64-mingw32\lib\libodbc32.a C:\strawberry\c\i686-w 
    64-mingw32\lib\libodbccp32.a C:\strawberry\c\i686-w64-mingw32\lib\libcomctl32.a 
    dll.exp 
    C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e chmod -- 755 blib\arch\au 
    to\Math\Random\Random.dll 
    C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e cp -- Random.bs blib\arch 
    \auto\Math\Random\Random.bs 
    C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e chmod -- 644 blib\arch\au 
    to\Math\Random\Random.bs 
     GROMMEL/Math-Random-0.71.tar.gz 
     C:\strawberry\c\bin\dmake.exe -- OK 
    Running make test 
    C:\strawberry\perl\bin\perl.exe "-Iblib\lib" "-Iblib\arch" test.pl 
    1..16 
    Can't load 'blib\arch/auto/Math/Random/Random.dll' for module Math::Random: load 
    _file:Invalid access to memory location at C:/strawberry/perl/lib/DynaLoader.pm 
    line 190. 
    at test.pl line 9. 
    Compilation failed in require at test.pl line 9. 
    BEGIN failed--compilation aborted at test.pl line 9. 
    dmake.exe: Error code 130, while making 'test_dynamic' 
     GROMMEL/Math-Random-0.71.tar.gz 
     C:\strawberry\c\bin\dmake.exe test -- NOT OK 
    //hint// to see the cpan-testers results for installing this module, try: 
     reports GROMMEL/Math-Random-0.71.tar.gz 
    Running make install 
     make test had returned bad status, won't install without force 
    Stopping: 'install' failed for 'Math::Random'. 
    Failed during this command: 
    GROMMEL/Math-Random-0.71.tar.gz    : make_test NO 
+1

같은 문제 일지 모르지만 다른 누군가가 비슷한 것을 만났는지. PerlMonks [(여기)] (http://www.perlmonks.org/?node_id=714484) 아마도 딸기 구성과 관련이 있을지도 모릅니다. 아니면 자동 실행 구성과 관련이있을 수도 있습니다 ... (가능한 답변 해당 PerlMonks 링크의 맨 아래에 있습니다.) – summea

+1

감사합니다. @summea. 그것을 알아 냈어, 문제는 경로에 있었다. – gjabel

답변

1

이제 문제가 해결되었습니다. 나는 (R 패키지를 개발하는 데 도움이 소프트웨어) Rtools를 제거하고 느슨한 경로 변수를 편집 ..

C:\Rtools\bin; 
C:\Rtools\perl\bin; 
C:\Rtools\gcc-4.6.3\bin; 
C:\Rtools\MinGW\bin; 

그때 제거하고 (나는 행운과 이전이 마지막 단계를 시도했다) 딸기 펄을 다시 설치. 나는 Path의 MinGW가 @summea 링크를 읽은 후 문제의 원인이 될 수 있다고 생각했다.태그를 추가하기 위해 편집한다.