http://www.perlmonks.org?node_id=1075357

jowe has asked for the wisdom of the Perl Monks concerning the following question:

Running sudo cpan install PAR::Packer gives me the following result:

Reading '/root/.cpan/Metadata' Database was generated on Mon, 17 Feb 2014 02:06:13 GMT Running install for module 'PAR::Packer' Running make for R/RS/RSCHUPP/PAR-Packer-1.017.tar.gz Checksum for /root/.cpan/sources/authors/id/R/RS/RSCHUPP/PAR-Packer-1. +017.tar.gz ok CPAN.pm: Building R/RS/RSCHUPP/PAR-Packer-1.017.tar.gz *** You have extra Perl library paths set in your environment. Please note that these paths (set with PERL5LIB or PERLLIB) are not honored by perl when running under taint mode, which may lead to problems. This is a limitation (by design) of Perl, not of PAR::Packer; but some of the problems may manifest here during installation. Checking if your kit is complete... Looks good Prototype mismatch: sub main::prompt: none vs ($;$) at /usr/local/shar +e/perl/5.14.2/ExtUtils/MakeMaker.pm line 221 Generating a Unix-style Makefile Writing Makefile for par Writing MYMETA.yml and MYMETA.json Generating a Unix-style Makefile Writing Makefile for PAR::Packer Writing MYMETA.yml and MYMETA.json cp lib/PAR/StrippedPARL/Base.pm blib/lib/PAR/StrippedPARL/Base.pm cp lib/PAR/Packer.pm blib/lib/PAR/Packer.pm cp lib/PAR/Filter/PodStrip.pm blib/lib/PAR/Filter/PodStrip.pm cp lib/PAR/Filter/Obfuscate.pm blib/lib/PAR/Filter/Obfuscate.pm cp lib/App/Packer/PAR.pm blib/lib/App/Packer/PAR.pm cp lib/PAR/Filter.pm blib/lib/PAR/Filter.pm cp lib/PAR/Filter/PatchContent.pm blib/lib/PAR/Filter/PatchContent.pm cp lib/PAR/Filter/Bytecode.pm blib/lib/PAR/Filter/Bytecode.pm cp lib/pp.pm blib/lib/pp.pm cp lib/PAR/Filter/Bleach.pm blib/lib/PAR/Filter/Bleach.pm make[1]: Entering directory `/root/.cpan/build/PAR-Packer-1.017-VWah5u +/myldr' Makefile:745: Warnung: Die Befehle für das Ziel ».c.o« werden überschr +ieben Makefile:334: Warnung: Alte Befehle für das Ziel ».c.o« werden ignorie +rt /usr/bin/perl par_pl2c.pl my_par_pl < ../script/par.pl > my_par_pl.c /usr/bin/perl sha1.c.PL cc -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-stric +t-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFF +SET_BITS=64 -I/usr/lib/perl/5.14/CORE -DPARL_EXE=\"parl\" -O2 -g ma +in.c main.c: In function ‘main’: main.c:121:23: warning: assignment discards ‘const’ qualifier from poi +nter target type [enabled by default] cc main.o -s -Wl,-E -fstack-protector -L/usr/local/lib -L/usr/lib/p +erl/5.14/CORE -lperl -ldl -lm -lpthread -lc -lcrypt -o ./par /usr/bin/ld: cannot find -lperl collect2: error: ld returned 1 exit status make[1]: *** [par] Fehler 1 make[1]: Leaving directory `/root/.cpan/build/PAR-Packer-1.017-VWah5u/ +myldr' make: *** [subdirs] Fehler 2 RSCHUPP/PAR-Packer-1.017.tar.gz /usr/bin/make -- NOT OK 'YAML' not installed, will not store persistent state Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible

My environment looks like:

TERM=xterm PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin LANG=de_DE.UTF-8 LANGUAGE= DISPLAY=:0 SHELL=/bin/bash LOGNAME=root USER=root USERNAME=root MAIL=/var/mail/root HOME=/root SUDO_COMMAND=/usr/bin/env SUDO_USER=indesu SUDO_UID=1000 SUDO_GID=1000

Running Linux Debian 7.4.0 and Perl 5.14.2.

Has it something to do with the UNIX-style makefile or is an environment variable missing??

I really would appreciate if you could point me into the right direction or is there any hint how to overcome the problem?

Many thanks in advance - Jo

Replies are listed 'Best First'.
Re: Debian: Problem installing PAR::Packer
by marto (Cardinal) on Feb 18, 2014 at 17:14 UTC

    This is odd:

    /usr/lib ln -s libperl.so.5.14 libperl.so

    Then PAR::Packer installs via cpan. I would strongly suggest you build your own perl and leave the system one alone, this is fairly trivial (read the update here).

    Update: I managed to mess up the code, fixed.

      Thanks very much. The 'ln' did it. Once again - many thanks - Jo

        Glad it worked, that being said please consider installing perl elsewhere and leaving the system perl alone :)

Re: Debian: Problem installing PAR::Packer
by farang (Chaplain) on Feb 18, 2014 at 20:45 UTC
      I tried it. PAR::Packer exists but did not install (Apper) due to an 'invalid format'.
Re: Debian: Problem installing PAR::Packer
by Anonymous Monk on Feb 18, 2014 at 16:55 UTC

    cannot find -lperl

    Where is libperl...a? Is it in /usr/lib/perl/5.14/CORE?

Re: Debian: Problem installing PAR::Packer
by Pizentios (Scribe) on Feb 19, 2014 at 15:02 UTC

    Like others have said here, messing with the system perl typically isn't a good thing. You can cause many many issues that aren't fun to fix. Using perlbrew or installing the modules using the system's package manager is much safer. However, sometimes the system's package manager is behind quite a few versions, which can be a pain as well.

    Personally i enjoy all that perlbrew has to offer.

    -Pizentios