Я написал скрипт на языке Perl, который протекание отлично на моем окружении, но на клиентской среде он терпит неудачу на:Perl не удается найти загружаемый объект для модуля Math :: Pari в @INC
Can't locate loadable object for module Math::Pari in @INC (@INC contains: Error-0.17020/lib JSON-2.57/lib URI-1.60 libwww-perl-5.836/lib Net-Address-IP-Local-0.1.2/lib Math-GMP-2.06/ Net- SSH-Perl-1.35/lib/ /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Util/SSH2MP.pm line 6
Compilation failed in require at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Util/SSH2MP.pm line 6, <GEN0> line 1.
BEGIN failed--compilation aborted at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Util/SSH2MP.pm line 6, <GEN0> line 1.
Compilation failed in require at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Util.pm line 56, <GEN0> line 1.
BEGIN failed--compilation aborted at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Kex/DH1.pm line 10, <GEN0> line 1.
Compilation failed in require at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Kex.pm line 6, <GEN0> line 1.
BEGIN failed--compilation aborted at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Kex.pm line 6, <GEN0> line 1.
Compilation failed in require at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/SSH2.pm line 6, <GEN0> line 1.
BEGIN failed--compilation aborted at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/SSH2.pm line 6, <GEN0> line 1.
Compilation failed in require at Net-SSH-Perl-1.35/lib//Net/SSH/Perl.pm line 52, <GEN0> line 1.
the user: ll was successfully added to the automation [email protected]:~/autom ation$ vim install.pl
I 've попытался добавить использовать lib' Math '; с содержимым модуля Math-Pari-2.0305_01080605, но не повезло:/
Я не хочу, чтобы мой клиент сам установил пакеты cpan самостоятельно - он должен быть полностью независимым от окружающей среды продуктом.
Я предпочитаю не переключаться с «Net-SSH-Perl-1.35», так как от этого зависит большая часть моего кода.
10x заранее!
UPDATE: Я переписывания обновление для уточнения вещи:
моей отправной точкой было со следующими библиотеками:
use lib 'Net-SSH-Perl-1.35/lib/';
use lib 'Math-GMP-2.06/';
use lib 'Net-Address-IP-Local-0.1.2/lib';
use lib 'libwww-perl-5.836/lib';
use lib 'URI-1.60';
use lib 'JSON-2.57/lib';
use lib 'Error-0.17020/lib';
use Net::SSH::Perl;
use LWP::Simple;
use JSON qw(decode_json);
use POSIX qw/strftime/;
use Net::Address::IP::Local;
который выведет следующее:
Can't locate Math/Pari.pm in @INC (@INC contains: Error-0.17020/lib JSON-2.57/lib URI-1.60 libwww- perl-5.836/lib Net-Address-IP-Local-0.1.2/lib Math-GMP-2.06/ Net-SSH-Perl-1.35/lib/ /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at Net-SSH-Perl- 1.35/lib//Net/SSH/Perl/Util/SSH2MP.pm line 6, <GEN0> line 1.
BEGIN failed--compilation aborted at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Util/SSH2MP.pm line 6, <GEN0> line 1.
Compilation failed in require at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Util.pm line 56, <GEN0> line 1.
BEGIN failed--compilation aborted at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Kex/DH1.pm line 10 , <GEN0> line 1.
Compilation failed in require at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Kex.pm line 6, <GEN0> line 1.
BEGIN failed--compilation aborted at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Kex.pm line 6, <GEN0> line 1.
Compilation failed in require at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/SSH2.pm line 6, <GEN0> line 1 .
BEGIN failed - компиляция отменена ...
Чтобы исправить это, я добавил следующее заявление:
использование lib 'Math-Pari-2.010709';
и ошибка изменено на:
Can't locate loadable object for module Math::Pari in @INC (@INC contains: Math-Pari-2.010709 Error- 0.17020/lib JSON-2.57/lib URI-1.60 libwww-perl-5.836/lib Net-Address-IP-Local-0.1.2/lib Math-GMP-2.06/ Net-SSH-Perl-1.35/lib/ /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at Net-SSH-Perl- 1.35/lib//Net/SSH/Perl/Util/SSH2MP.pm line 6
Compilation failed in require at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Util/SSH2MP.pm line 6, <GEN0> line 1.
BEGIN failed--compilation aborted at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Util/SSH2MP.pm line 6, <GEN0> line 1.
Compilation failed in require at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Util.pm line 56, <GEN0> line 1.
BEGIN failed--compilation aborted at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Kex/DH1.pm line 10, <GEN0> line 1.
Compilation failed in require at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Kex.pm line 6, <GEN0> line 1.
BEGIN failed--compilation aborted at Net-SSH-Perl-1.35/lib//Net/SSH/Perl/Kex.pm line 6, <GEN0> line 1.
Compilation failed in require at Net-SSH-Perl-1....
это содержание Math-Pari-2.010709:
drwxr-xr-x 3 notroot notroot 4096 May 7 14:38 ./
drwxr-xr-x 11 notroot notroot 4096 May 7 21:30 ../
drwxr-xr-x 7 notroot notroot 4096 May 7 14:38 Math/
Math-Pari-2,010709/Математика:
total 240
drwxr-xr-x 7 notroot notroot 4096 May 7 14:38 ./
drwxr-xr-x 3 notroot notroot 4096 May 7 14:38 ../
-r--r--r-- 1 notroot notroot 27440 Oct 25 2006 Changes
-r--r--r-- 1 notroot notroot 17793 Feb 1 2004 func_codes.h
-r--r--r-- 1 notroot notroot 8676 Aug 9 2006 INSTALL
drwxr-xr-x 2 notroot notroot 4096 Oct 25 2006 libPARI/
-r--r--r-- 1 notroot notroot 7573 Oct 25 2006 Makefile.PL
-r--r--r-- 1 notroot notroot 780 Nov 11 2005 MANIFEST
-r--r--r-- 1 notroot notroot 297 Oct 25 2006 META.yml
-r--r--r-- 1 notroot notroot 1322 Aug 23 2006 PariInit.pm
-r--r--r-- 1 notroot notroot 35680 Oct 25 2006 Pari.pm
-r--r--r-- 1 notroot notroot 79499 Oct 18 2006 Pari.xs
drwxr-xr-x 2 notroot notroot 4096 Oct 25 2006 patches/
-r--r--r-- 1 notroot notroot 4286 Jan 30 2004 README
drwxr-xr-x 2 notroot notroot 4096 Oct 25 2006 t/
drwxr-xr-x 2 notroot notroot 4096 Oct 25 2006 test_eng/
-r--r--r-- 1 notroot notroot 1142 Jan 20 2005 TODO
-r--r--r-- 1 notroot notroot 1361 Jul 8 2001 typemap
drwxr-xr-x 3 notroot notroot 4096 Oct 25 2006 utils/
Мне нужно сказать, что папка Math изначально не существовала в Math-Pari-2.010709, поэтому я ее создал и переместил контент Math-Pari-2.010709 в него, в порядке поиска.
На этом этапе я добавил: использовать Math ::
Пари, но кажется, что не делает различие:
Can't locate loadable object for module Math::Pari in @INC (@INC contains: Math-Pari-2.010709 Error- 0.17020/lib JSON-2.57/lib URI-1.60 libwww-perl-5.836/lib Net-Address-IP-Local-0.1.2/lib Math-GMP-2.06/ Net-SSH-Perl-1.35/lib/ /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at ./install.pl line 24
Compilation failed in require at ./install.pl line 24.
BEGIN failed--compilation aborted at ./install.pl line 24.
я вещь, что суммировать все мои попытки до сих пор.
Буду признателен за любую помощь!
Разве вы не должны делать что-то вроде «использовать Pari;» после вашего заявления 'use lib'? Проверьте документацию «use» – golimar
Вы должны показать свои операторы 'use'. Вы даете полный путь в своей 'use lib'? – chrsblck
так что ваш скрипт 'perl' сидит в корне всех этих путей? В противном случае вам нужно добавить к ним полные пути. – chrsblck