Hello,
I am trying to install Perl modules on my Debian Bookworm system.
Unfortunately, cpan and cpanm both always fail giving lots of varying error messages.
First I tried to install GD::Graph:
This spam showed that Debian for some reason failed to install the prerequisite module "gdlib".
This is shown by:So this throws up the question, what is the file "gdlib.pc" and which package(s) do I need to install first so that cpan won't croak due to the missing dependency?
There are several Linux distros which do not support cpan/cpanm, but require to install Perl modules via their respective package manager.
So, do I need to install Perl modules via apt install?
And how to find out which apt package contains a particular Perl module?
I am trying to install Perl modules on my Debian Bookworm system.
Unfortunately, cpan and cpanm both always fail giving lots of varying error messages.
First I tried to install GD::Graph:
Code:
# cpan GD::GraphLoading internal logger. Log::Log4perl recommended for better loggingReading '/root/.cpan/Metadata' Database was generated on Tue, 10 Dec 2024 12:52:41 GMTRunning install for module 'GD::Graph'Checksum for /root/.cpan/sources/authors/id/B/BP/BPS/GDGraph-1.56.tar.gz ok/usr/bin/tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.macromates.visibleIndex'/usr/bin/tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.macromates.selectionRange'/usr/bin/tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.macromates.visibleIndex'/usr/bin/tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.macromates.selectionRange'/usr/bin/tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.macromates.visibleIndex'/usr/bin/tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.macromates.selectionRange'/usr/bin/tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.macromates.visibleIndex'/usr/bin/tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.macromates.selectionRange'/usr/bin/tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.macromates.visibleIndex'/usr/bin/tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.macromates.selectionRange''YAML' not installed, will not store persistent stateConfiguring B/BP/BPS/GDGraph-1.56.tar.gz with Makefile.PLChecking if your kit is complete...Looks goodWarning: prerequisite GD 1.18 not found.Warning: prerequisite GD::Text 0.80 not found.Generating a Unix-style MakefileWriting Makefile for GD::GraphWriting MYMETA.yml and MYMETA.jsonThe automatic tests for GDGraph are not really a solid workout of thelibrary. The best way to test the package is to run the examplesbefore installing it. You can run the examples in the samplesdirectory with `make samples` or by going into that directory, andjust running `make`.If that fails, please read samples/Makefile.UPDATE 1: Running the examples is part of the test procedure now. Youare still encouraged to run check them out to learn from them andto see the ouput images.UPDATE 2 (2023-0-13): The samples fail if libgd is installed withoutimage support enabled, which is the default starting with version 2.3.3.The samples should be automatically skipped if this is detected. Torun the tests from samples, install libgd with image support enabled. BPS/GDGraph-1.56.tar.gz /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OKRunning make for B/BP/BPS/GDGraph-1.56.tar.gz---- Unsatisfied dependencies detected during -------- BPS/GDGraph-1.56.tar.gz ---- GD [requires] GD::Text [requires]Running install for module 'GD'Checksum for /root/.cpan/sources/authors/id/R/RU/RURBAN/GD-2.83.tar.gz okConfiguring R/RU/RURBAN/GD-2.83.tar.gz with Makefile.PLPackage gdlib was not found in the pkg-config search path.Perhaps you should add the directory containing `gdlib.pc'to the PKG_CONFIG_PATH environment variablePackage 'gdlib', required by 'virtual:world', not found at Makefile.PL line 578.*** can not find package gdlib*** check that it is properly installed and available in PKG_CONFIG_PATH at Makefile.PL line 578.Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site] RURBAN/GD-2.83.tar.gz /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OKRunning install for module 'GD::Text'Checksum for /root/.cpan/sources/authors/id/M/MV/MVERB/GDTextUtil-0.86.tar.gz okConfiguring M/MV/MVERB/GDTextUtil-0.86.tar.gz with Makefile.PLChecking if your kit is complete...Looks goodWarning: prerequisite GD 1 not found.Generating a Unix-style MakefileWriting Makefile for GD::TextWriting MYMETA.yml and MYMETA.json MVERB/GDTextUtil-0.86.tar.gz /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OKRunning make for M/MV/MVERB/GDTextUtil-0.86.tar.gz---- Unsatisfied dependencies detected during -------- MVERB/GDTextUtil-0.86.tar.gz ---- GD [requires]Running install for module 'GD' RURBAN/GD-2.83.tar.gz Has already been unwrapped into directory /root/.cpan/build/GD-2.83-8 RURBAN/GD-2.83.tar.gz '/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 256, not re-running MVERB/GDTextUtil-0.86.tar.gz Has already been unwrapped into directory /root/.cpan/build/GDTextUtil-0.86-5 MVERB/GDTextUtil-0.86.tar.gz Has already been preparedRunning make for M/MV/MVERB/GDTextUtil-0.86.tar.gzWarning: Prerequisite 'GD => 1' for 'MVERB/GDTextUtil-0.86.tar.gz' failed when processing 'RURBAN/GD-2.83.tar.gz' with 'writemakefile => NO '/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 256'. Continuing, but chances to succeed are limited.cp Text/Align.pm blib/lib/GD/Text/Align.pmcp Text/Wrap.pm blib/lib/GD/Text/Wrap.pmcp Text.pm blib/lib/GD/Text.pmManifying 3 pod documents MVERB/GDTextUtil-0.86.tar.gz /usr/bin/make -- OKThe current configuration of allow_installing_outdated_dists is 'ask/no', but for this option we would need 'CPAN::DistnameInfo' installed. Please install 'CPAN::DistnameInfo' as soon as possible. As long as we are not equipped with 'CPAN::DistnameInfo' this option does not take effectRunning make test for MVERB/GDTextUtil-0.86.tar.gzPERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.tt/align.t .. Can't locate GD.pm in @INC (you may need to install the GD module) (@INC contains: . .. /root/.cpan/build/GDTextUtil-0.86-5/blib/lib /root/.cpan/build/GDTextUtil-0.86-5/blib/arch /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at t/align.t line 8.BEGIN failed--compilation aborted at t/align.t line 8.# Looks like your test exited with 2 before it could output anything.t/align.t .. Dubious, test returned 2 (wstat 512, 0x200)Failed 21/21 subtests t/text.t ... Can't locate GD.pm in @INC (you may need to install the GD module) (@INC contains: . .. /root/.cpan/build/GDTextUtil-0.86-5/blib/lib /root/.cpan/build/GDTextUtil-0.86-5/blib/arch /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at t/text.t line 8.BEGIN failed--compilation aborted at t/text.t line 8.# Looks like your test exited with 2 before it could output anything.t/text.t ... Dubious, test returned 2 (wstat 512, 0x200)Failed 20/20 subtests t/wrap.t ... Can't locate GD.pm in @INC (you may need to install the GD module) (@INC contains: . .. /root/.cpan/build/GDTextUtil-0.86-5/blib/lib /root/.cpan/build/GDTextUtil-0.86-5/blib/arch /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at t/wrap.t line 7.BEGIN failed--compilation aborted at t/wrap.t line 7.# Looks like your test exited with 2 before it could output anything.t/wrap.t ... Dubious, test returned 2 (wstat 512, 0x200)Failed 14/14 subtests Test Summary Report-------------------t/align.t (Wstat: 512 (exited 2) Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 21 tests but ran 0.t/text.t (Wstat: 512 (exited 2) Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 20 tests but ran 0.t/wrap.t (Wstat: 512 (exited 2) Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 14 tests but ran 0.Files=3, Tests=0, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.20 cusr 0.03 csys = 0.26 CPU)Result: FAILFailed 3/3 test programs. 0/0 subtests failed.make: *** [Makefile:829: test_dynamic] Error 2 MVERB/GDTextUtil-0.86.tar.gzone dependency not OK (GD); additionally test harness failed /usr/bin/make test -- NOT OK//hint// to see the cpan-testers results for installing this module, try: reports MVERB/GDTextUtil-0.86.tar.gz BPS/GDGraph-1.56.tar.gz Has already been unwrapped into directory /root/.cpan/build/GDGraph-1.56-4 BPS/GDGraph-1.56.tar.gz Has already been preparedRunning make for B/BP/BPS/GDGraph-1.56.tar.gzWarning: Prerequisite 'GD => 1.18' for 'BPS/GDGraph-1.56.tar.gz' failed when processing 'RURBAN/GD-2.83.tar.gz' with 'writemakefile => NO '/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 256'. Continuing, but chances to succeed are limited.Warning: Prerequisite 'GD::Text => 0.80' for 'BPS/GDGraph-1.56.tar.gz' failed when processing 'MVERB/GDTextUtil-0.86.tar.gz' with 'make_test => NO one dependency not OK (GD); additionally test harness failed'. Continuing, but chances to succeed are limited.cp Graph/linespoints.pm blib/lib/GD/Graph/linespoints.pmcp Graph/colour.pm blib/lib/GD/Graph/colour.pmcp Graph.pm blib/lib/GD/Graph.pmcp Graph/area.pm blib/lib/GD/Graph/area.pmcp Graph/lines.pm blib/lib/GD/Graph/lines.pmcp Graph/utils.pm blib/lib/GD/Graph/utils.pmcp Graph/pie.pm blib/lib/GD/Graph/pie.pmcp Graph/mixed.pm blib/lib/GD/Graph/mixed.pmcp Graph/axestype.pm blib/lib/GD/Graph/axestype.pmcp Graph/FAQ.pod blib/lib/GD/Graph/FAQ.podcp Graph/bars.pm blib/lib/GD/Graph/bars.pmcp Graph/hbars.pm blib/lib/GD/Graph/hbars.pmcp Graph/points.pm blib/lib/GD/Graph/points.pmcp Graph/Error.pm blib/lib/GD/Graph/Error.pmcp Graph/Data.pm blib/lib/GD/Graph/Data.pmManifying 6 pod documents BPS/GDGraph-1.56.tar.gz /usr/bin/make -- OKThe current configuration of allow_installing_outdated_dists is 'ask/no', but for this option we would need 'CPAN::DistnameInfo' installed. Please install 'CPAN::DistnameInfo' as soon as possible. As long as we are not equipped with 'CPAN::DistnameInfo' this option does not take effectRunning make test for BPS/GDGraph-1.56.tar.gzPERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/*/*.tt/axestype.t ................... Can't locate GD.pm in @INC (you may need to install the GD module) (@INC contains: /root/.cpan/build/GDGraph-1.56-4/blib/lib /root/.cpan/build/GDGraph-1.56-4/blib/arch /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl .) at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph.pm line 38.BEGIN failed--compilation aborted at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph.pm line 38.Compilation failed in require at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph/axestype.pm line 18.BEGIN failed--compilation aborted at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph/axestype.pm line 18.Compilation failed in require at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph/mixed.pm line 18.BEGIN failed--compilation aborted at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph/mixed.pm line 18.Compilation failed in require at t/axestype.t line 11.BEGIN failed--compilation aborted at t/axestype.t line 11.t/axestype.t ................... Dubious, test returned 2 (wstat 512, 0x200)Failed 13/13 subtests t/bugfixes.t ................... 1/33 # Failed test 'use GD::Graph;'# at t/bugfixes.t line 6.# Tried to use 'GD::Graph'.# Error: Can't locate GD.pm in @INC (you may need to install the GD module) (@INC contains: /root/.cpan/build/GDGraph-1.56-4/blib/lib /root/.cpan/build/GDGraph-1.56-4/blib/arch /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl .) at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph.pm line 38.# BEGIN failed--compilation aborted at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph.pm line 38.# Compilation failed in require at t/bugfixes.t line 6.# BEGIN failed--compilation aborted at t/bugfixes.t line 6.Can't locate object method "new" via package "GD::Graph" at t/bugfixes.t line 8.# Looks like your test exited with 255 just after 1.t/bugfixes.t ................... Dubious, test returned 255 (wstat 65280, 0xff00)Failed 33/33 subtests t/colour.t ..................... ok t/data.t ....................... ok t/error.t ...................... ok t/samples.t .................... Can't locate GD.pm in @INC (you may need to install the GD module) (@INC contains: /root/.cpan/build/GDGraph-1.56-4/blib/lib /root/.cpan/build/GDGraph-1.56-4/blib/arch /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl .) at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph.pm line 38.BEGIN failed--compilation aborted at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph.pm line 38.Compilation failed in require at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph/axestype.pm line 18.BEGIN failed--compilation aborted at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph/axestype.pm line 18.Compilation failed in require at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph/bars.pm line 18.BEGIN failed--compilation aborted at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph/bars.pm line 18.Compilation failed in require at t/samples.t line 18.BEGIN failed--compilation aborted at t/samples.t line 18.t/samples.t .................... Dubious, test returned 2 (wstat 512, 0x200)No subtests run t/tickets/73185-div-by-zero.t .. 1/? # Failed test 'use GD::Graph::lines;'# at t/tickets/73185-div-by-zero.t line 4.# Tried to use 'GD::Graph::lines'.# Error: Can't locate GD.pm in @INC (you may need to install the GD module) (@INC contains: /root/.cpan/build/GDGraph-1.56-4/blib/lib /root/.cpan/build/GDGraph-1.56-4/blib/arch /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl .) at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph/lines.pm line 18.# BEGIN failed--compilation aborted at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph/lines.pm line 18.# Compilation failed in require at t/tickets/73185-div-by-zero.t line 4.# BEGIN failed--compilation aborted at t/tickets/73185-div-by-zero.t line 4.Can't locate object method "new" via package "GD::Graph::lines" at t/tickets/73185-div-by-zero.t line 6.# Tests were run but no plan was declared and done_testing() was not seen.# Looks like your test exited with 255 just after 1.t/tickets/73185-div-by-zero.t .. Dubious, test returned 255 (wstat 65280, 0xff00)Failed 1/1 subtests t/use.t ........................ Can't locate GD.pm in @INC (you may need to install the GD module) (@INC contains: /root/.cpan/build/GDGraph-1.56-4/blib/lib /root/.cpan/build/GDGraph-1.56-4/blib/arch /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl .) at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph.pm line 38.BEGIN failed--compilation aborted at /root/.cpan/build/GDGraph-1.56-4/blib/lib/GD/Graph.pm line 38.Compilation failed in require at t/use.t line 7.BEGIN failed--compilation aborted at t/use.t line 7.t/use.t ........................ Dubious, test returned 2 (wstat 512, 0x200)Failed 10/10 subtests Test Summary Report-------------------t/axestype.t (Wstat: 512 (exited 2) Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 13 tests but ran 0.t/bugfixes.t (Wstat: 65280 (exited 255) Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 33 tests but ran 1.t/samples.t (Wstat: 512 (exited 2) Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP outputt/tickets/73185-div-by-zero.t (Wstat: 65280 (exited 255) Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: No plan found in TAP outputt/use.t (Wstat: 512 (exited 2) Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 10 tests but ran 0.Files=8, Tests=64, 0 wallclock secs ( 0.04 usr 0.01 sys + 0.33 cusr 0.04 csys = 0.42 CPU)Result: FAILFailed 5/8 test programs. 2/64 subtests failed.make: *** [Makefile:891: test_dynamic] Error 2 BPS/GDGraph-1.56.tar.gz2 dependencies missing (GD,GD::Text); additionally test harness failed /usr/bin/make test -- NOT OK//hint// to see the cpan-testers results for installing this module, try: reports BPS/GDGraph-1.56.tar.gz#This is shown by:
Code:
# cat /root/.cpanm/work/1733836710.527946/build.logcpanm (App::cpanminus) 1.7048 on perl 5.036000 built for x86_64-linux-gnu-thread-multiWork directory is /root/.cpanm/work/1733836710.527946You have make /usr/bin/makeYou have LWP 6.68You have /usr/bin/tar: tar (GNU tar) 1.34Copyright (C) 2021 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.Written by John Gilmore and Jay Fenlason.You have /usr/bin/unzipSearching GD () on cpanmetadb ...--> Working on GDFetching http://www.cpan.org/authors/id/R/RU/RURBAN/GD-2.83.tar.gz-> OKUnpacking GD-2.83.tar.gzEntering GD-2.83Checking configure dependencies from META.jsonChecking if you have ExtUtils::Constant 0.22 ... Yes (0.25)Checking if you have ExtUtils::PkgConfig 0 ... Yes (1.16)Checking if you have File::Which 0 ... Yes (1.27)Configuring GD-2.83Running Makefile.PLNotice: Type perl Makefile.PL -h for command-line option summary.Package gdlib was not found in the pkg-config search path.Perhaps you should add the directory containing `gdlib.pc'to the PKG_CONFIG_PATH environment variablePackage 'gdlib', required by 'virtual:world', not found at Makefile.PL line 578.*** can not find package gdlib*** check that it is properly installed and available in PKG_CONFIG_PATH at Makefile.PL line 578.-> N/A-> FAIL Configure failed for GD-2.83. See /root/.cpanm/work/1733836710.527946/build.log for details.# apt install libgdReading package lists... DoneBuilding dependency tree... DoneReading state information... DoneE: Unable to locate package libgd# cd /root/.cpan/build/GD-2.83-8# /usr/bin/perl Makefile.PL INSTALLDIRS=sitePackage gdlib was not found in the pkg-config search path.Perhaps you should add the directory containing `gdlib.pc'to the PKG_CONFIG_PATH environment variablePackage 'gdlib', required by 'virtual:world', not found at Makefile.PL line 578.*** can not find package gdlib*** check that it is properly installed and available in PKG_CONFIG_PATH at Makefile.PL line 578. #There are several Linux distros which do not support cpan/cpanm, but require to install Perl modules via their respective package manager.
So, do I need to install Perl modules via apt install?
And how to find out which apt package contains a particular Perl module?
Statistics: Posted by Meow — 2024-12-10 14:03 — Replies 2 — Views 22