Όταν μια εγκατάσταση πάει στραβά#

Πρώτα τα συμπτώματα, αφού αυτά είναι που έχετε όταν φτάνετε εδώ.

«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'.