2013-11-26 1 views
0

Slackware64를 14.1로 업그레이드했고 Perl 5.18이 발견되었습니다. Socket.pm은 다른 Perl 버전 (5.16)을 위해 컴파일되었다고 불평합니다. 여기에 오류 :업그레이드 후 Socket.pm을로드 할 수 없다 (다시 설치)

Perl API version v5.16.0 of Socket does not match v5.18.0 at /usr/share/perl5/XSLoader.pm line 92. 

불행하게도, 난 cpan와 Socket.pm를 다시 설치하는 경우에도 드릴 수 없습니다.

$ cpan Socket 
Reading '/home/francesco-salix/.cpan/Metadata' 
    Database was generated on Tue, 26 Nov 2013 09:08:12 GMT 
Running install for module 'Socket' 
Running make for P/PE/PEVANS/Socket-2.013.tar.gz 
Checksum for /home/francesco-salix/.cpan/sources/authors/id/P/PE/PEVANS/Socket-2.013.tar.gz ok 

    CPAN.pm: Building P/PE/PEVANS/Socket-2.013.tar.gz 

Attempt to reload Socket.pm aborted. 
Compilation failed in require at /usr/share/perl5/IPC/Cmd.pm line 46. 
BEGIN failed--compilation aborted at /usr/share/perl5/IPC/Cmd.pm line 46. 
Compilation failed in require at /usr/share/perl5/ExtUtils/CBuilder/Base.pm line 11. 
BEGIN failed--compilation aborted at /usr/share/perl5/ExtUtils/CBuilder/Base.pm line 11. 
Compilation failed in require at /usr/share/perl5/ExtUtils/CBuilder/Platform/Unix.pm line 4. 
BEGIN failed--compilation aborted at /usr/share/perl5/ExtUtils/CBuilder/Platform/Unix.pm line 4. 
Compilation failed in require at (eval 6) line 2. 
BEGIN failed--compilation aborted at (eval 6) line 2. 
Compilation failed in require at Makefile.PL line 19. 
Warning: No success on command[/usr/bin/perl5.18.1 Makefile.PL] 
'YAML' not installed, will not store persistent state 
    PEVANS/Socket-2.013.tar.gz 
    /usr/bin/perl5.18.1 Makefile.PL -- NOT OK 
Running make test 
    Make had some problems, won't test 
Running make install 
    Make had some problems, won't install 
Could not read metadata file. Falling back to other methods to determine prerequisites 

내가 아는 한 Socket.pm은 Perl 핵심 모듈입니다. 그래서 Perl과 함께 업그레이드 될 것이라고 생각했습니다. 여기

@INC 현재 디렉토리입니다

$ perl -E'say for @INC' 
/home/francesco-salix/perl5/lib/perl5/x86_64-linux-thread-multi 
/home/francesco-salix/perl5/lib/perl5 
/usr/local/lib64/perl5 
/usr/local/share/perl5 
/usr/lib64/perl5/vendor_perl 
/usr/share/perl5/vendor_perl 
/usr/lib64/perl5 
/usr/share/perl5 
. 

나는 일부 폴더가 중복 보인다 볼 수 있지만, 그들이 그렇게 있어야하는 경우 실제로 모른다. 내가 /usr/local/lib64/perl5//usr/lib64/perl5 모두에 대해 Socket.pm 파일을했습니다 동안 그러나, cpan 추가 어디에 내 사용자로 실행하는 동안 나는 가정의 처음 두 경로에 Socket.pm을 (이 없습니다.

답변

2

Socket.pm 실제로 핵심 모듈이다. 그리고 CPAN.pm 모듈위한 ExtUtils :: MakeMaker이 (IPC : Cmd를 통해)를 사용하기 때문에 Socket.pm가 깨진 경우, CPAN.pm가 Makefile.PL이 너무 세분화됩니다.

는 점을 감안 핵심 모듈이고 Perl과 함께 설치되었을 것입니다. 이것은 Perl이 다른 이전 경로에서 Socket.pm을로드하려고 시도한다는 것을 나에게 제안합니다. 다음은 Perl이 tr 모듈을로드 할 대상 :

perl -E'say for @INC' 

거기에 의심스러운 것이 있습니까? Perl 5.16 용으로 컴파일 된 구 모듈을 찾을 수있는 곳은 어디입니까?

+0

@tobyinc, 당신이 옳을 수도 있습니다. 내 편집을 참조하십시오. 현재'@ INC'를 올리시겠습니까? – Zagorax

+0

'pkgtools'에 따르면,'perl' 패키지는'/ usr/lib64/perl5' 파일을 참조하기 때문에'/ usr/local/lib64/perl5'는 업그레이드 중에 제거되지 않은 이전 파일을 가리킨다 고 가정합니다. 포함 경로를 수정하려면 어떻게해야합니까? – Zagorax

+0

슬랙웨어에 있지 않아서 @INC가 도움이되지 않을 것입니다. 나는 당신의 홈 디렉토리에있는 경로가 문제가있는 경로 일 가능성이 가장 큰 ikegami와 동의합니다. 나는 그것들을 문지르기부터 시작할 것입니다. – tobyink

0

이 솔루션은 3rensho’s comment 다음, 기존의 모듈을 취소하는 것입니다 :

sudo rm -rf /usr/local/lib64/perl5/* 
sudo rm -rf /usr/local/share/perl5/* 

의미가 있습니다!