כשהתקנה משתבשת#
תסמינים תחילה, שכן זה מה שיש לכם כשאתם מגיעים לכאן.
”Can’t locate Foo/Bar.pm“ לאחר התקנה מוצלחת#
The install said it worked, and the module is not there. pperl searches lib/perl5 under $PPERL_HOME, or under ~/.pperl when that is unset, so the usual cause is that the install and the run see different trees: PPERL_HOME was set for one and not the other, or the install went into a tree pperl does not search unasked. Compare the ”installed into“ line of the install with pperl’s search path:
pperl -e 'print "$_\n" for @INC'
A tree that is missing there can be added with PPERL5LIB.
A distribution that declares XS installs its modules into the tree’s architecture directory, lib/perl5/x86_64-linux/ on this platform, even when they are pure Perl. That is not a cause: as perl does, pperl searches the architecture directory of every tree on PPERL5LIB, PERL5LIB and -I, and of ~/.pperl/lib/perl5.
המתקין רוצה לבנות מודול ש־pperl כבר מחזיק#
ודאו מה pperl חושב שהוא מספק, ובאיזו גרסה:
pperl -MConfig -MExtUtils::MakeMaker -e \
'my $f = Config::lib_file("Storable.pm"); print "$f ", MM->parse_version($f), "\n"'
# ./pperl-native/Storable.pm 3.41
אם הנתיב מתחיל ב־./pperl-native/ המודול מובנה. אם המתקין עדיין רוצה אותו, השוו את הגרסאות: התלות עשויה באמת להיות חדשה יותר מהגרסה ש־pperl נושא, ובמקרה כזה שום סידור לא יספק אותה.
מתקין שאינו המתקין של pperl עצמו, המורץ תחת pperl, מחפש מודולים באמצעות בדיקות קובץ ואינו רואה את המובנים. השתמשו ב־pperl --cpan.
”Can’t locate loadable object for module Foo::Bar in @INC“#
XS: the module wants its compiled part, and pperl does not build one. Read the no-XS rule to work out which shape the distribution is, because shapes 2 and 3 there have a way forward and shapes 4 and 5 do not.
A module that has a Perl implementation of its own catches this message and uses that implementation, so you do not see it. When you do, the module either has no Perl implementation, or has one that is switched on another way, such as by an environment variable its documentation names.
”Need to fall back to http“#
Missing or unusable modules 'Net::SSLeay', 'IO::Socket::SSL', and found neither curl nor wget installed.
Need to fall back to http.
This pperl has no TLS support of its own, and the host has neither curl nor wget, so the CPAN client downloads over plain http. Install curl or wget; the next pperl --cpan run finds it and downloads over https. The XS substitutes are not fetched at all in this state, and that warning (below) ends in neither curl nor wget is configured.
”XS substitutes not refreshed from …“#
pperl: --cpan: XS substitutes not refreshed from https://perl.petamem.com/downloads/cppan: ...
The run could not fetch pperl’s substitutes for XS distributions, for the reason named at the end: no network, or a server error. The install carries on with the substitutes fetched last, so only one published since then is missing. On a machine that is never online, set PPERL_CPPAN_URL to an empty string to stop the attempt.
pperl: --cpan: cannot unpack .../cppan.tar.gz; the XS substitutes stay as they were
The download arrived but is not an archive pperl can unpack. The install carries on with the substitutes fetched before it, and the next run downloads the file afresh.
ההתקנה נתקעת בהמתנה לקלט#
היא לא אמורה - תחת --cpan, PERL_MM_USE_DEFAULT ו־NONINTERACTIVE_TESTING מוגדרים שניהם, ולכן הפצות לוקחות את ברירות המחדל שלהן. אם אתם מפעילים מתקין בעצמכם, הגדירו את שניהם.
הבדיקות נכשלות אך המודול תקין#
-T עובר ישירות אל לקוח ה־CPAN ומדלג על הבדיקות:
pperl --cpan -T Some::Module
כדאי לעשות זאת פעם אחת כדי לגלות אם המודול או חבילת הבדיקות שלו היא הבעיה. חבילת בדיקות שהיא עצמה תלויה ב־XS תיכשל מול מודול Perl טהור תקין לחלוטין.
להתחיל מחדש#
העץ בר־השלכה. שום דבר אחר אינו מתייחס אליו:
rm -rf ~/.pperl
pperl --cpan Your::Module
דיווח#
אם הפצת Perl טהור נכשלת בהתקנה, או מותקנת ואז אינה ניתנת לטעינה, זהו באג ב־pperl וכדאי לפתוח עליו דיווח:
petamem/pperl-bugtracker#issues
כללו את שם ההפצה והגרסה, את הפלט המלא של --cpan, ואת pperl -e 'print "$_\n" for @INC'.