You are not logged in.

#1 2012-08-26 00:24:51

belbo
Member
From: Sydney, Australia
Registered: 2011-02-25
Posts: 51

Script cannot find perl Data:Dumper module

Good day. I live in Australia and use a script called Shepherd to update my mythtv program listings.

After upgrading a couple of days ago (first time in about 6 months) Shepherd has stopped working.

Shepherd doesn't seem to find the perl data-dumper module, which is part of the base perl install.

All my packages are up to date as of this post, and I am on the current kernel -

 uname -r
3.4.9-1-ARCH
~/.shepherd/shepherd --check

ERROR:
Mandatory module 'Data::Dumper' not found.

Please see the Wiki at <a href='http://svn.whuffy.com/wiki/Installation' class='bbc_url' title='External link' rel='nofollow external'>http://svn.whuffy.co...ki/Installation</a>
for details on how to install this module.

Shepherd is updating ~/.shepherd/output.xmltv (the listings information scraped from the net) but evidently needs the dumper module to post the data into MythTV.

I'm not sure if it has something to do with this, which I don't properly understand -

The current Arch Linux default perl installation installs updates to core modules into the perl core directories, creating file conflicts.  Examples include modules such as Data::Dumper and version.

which is mentioned here.

I appear to have it installed as part of the perl base package -

sudo pacman -Qi perl
Name           : perl
Version        : 5.16.1-1
URL            : <a href='http://www.perl.org' class='bbc_url' title='External link' rel='nofollow external'>http://www.perl.org</a>
Licenses       : GPL  PerlArtistic
Groups         : base
Provides       : perl-archive-extract=0.58  perl-archive-tar=1.82  perl-attribute-handlers=0.93  perl-autodie=2.10
                 perl-autoloader=5.72  perl-autouse=1.07  perl-b-debug=1.17  perl-b-deparse=1.14  perl-b-lint=1.14
                 perl-base=2.18  perl-bignum=0.29  perl-carp=1.26  perl-cgi=3.59  perl-compress-raw-bzip2=2.048
                 perl-compress-raw-zlib=2.048  perl-constant=1.23  perl-cpan=1.9800  perl-cpan-meta=2.120630
                 perl-cpan-meta-yaml=0.007  perl-cpanplus=0.9121  perl-cpanplus-dist-build=0.62 perl-data-dumper=2.135

So it seems Shepherd is suddenly not finding it for some reason, after the upgrade.


I tried installing the perl-data-dumper packages from the AUR (simple and concise) and neither of those made any difference.

I also tried installing the module with a cpan command (as root) but that gave me errors (which I'd rather not have to deal with unless I have to to fix this issue).

cpan
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.9800)
Enter 'h' for help.

cpan[1]> install data:dumper
Reading '/root/.cpan/sources/authors/01mailrc.txt.gz'
sh: /bin/gzip: No such file or directory
............................................................................DONE
Reading '/root/.cpan/sources/modules/02packages.details.txt.gz'
sh: /bin/gzip: No such file or directory
Warning: Your /root/.cpan/sources/modules/02packages.details.txt.gz does not contain a Line-Count header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
Warning: Your /root/.cpan/sources/modules/02packages.details.txt.gz does not contain a Last-Updated header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
Subroutine AUTOLOAD redefined at /usr/lib/perl5/site_perl/Time/HiRes.pm line 31.
Subroutine import redefined at /usr/lib/perl5/site_perl/Time/HiRes.pm line 49.
Subroutine tv_interval redefined at /usr/lib/perl5/site_perl/Time/HiRes.pm line 70.
.Could not split line["H\"rW{0M4K\cV1=YFH\cV\c^rqv\c?\c]hKUe\cGL)4:4\cH]C\cPW`_|#MU4}\c_\c_%\cQ\cN\cX8M}%e\cR|\cG-K\c?~\cAM_cREx#AnvAZDi\$\c\!h\cZ\cI^uG0    )>TQ}p{Q[Ah\cNIK\cV+R"]
Could not split line["-6W/GQp\cOm`>UwBP[5"]
Could not split line["\@\cPI\cW,(zY2]uA!fVegsf\\V\cGfL\cHY4ki\cFvLgY\\\c\Ed\cK\cTe-\cC0\@d!?\cSU/\\G8\cAt?(\cY.L\cZ\cBrtl~s[4\@\cF\cWu*D>I"]
Could not split line["hb\cSKA1\cCjX(w/K\cA"]
Giving up parsing your /root/.cpan/sources/modules/02packages.details.txt.gz, too many errorsReading '/root/.cpan/sources/authors/01mailrc.txt.gz'
sh: /bin/gzip: No such file or directory
............................................................................DONE
Reading '/root/.cpan/sources/modules/02packages.details.txt.gz'
sh: /bin/gzip: No such file or directory
Warning: Your /root/.cpan/sources/modules/02packages.details.txt.gz does not contain a Line-Count header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
Subroutine AUTOLOAD redefined at /usr/lib/perl5/site_perl/Time/HiRes.pm line 31.
Subroutine import redefined at /usr/lib/perl5/site_perl/Time/HiRes.pm line 49.
Subroutine tv_interval redefined at /usr/lib/perl5/site_perl/Time/HiRes.pm line 70.
Warning: Your /root/.cpan/sources/modules/02packages.details.txt.gz does not contain a Last-Updated header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
Subroutine AUTOLOAD redefined at /usr/lib/perl5/site_perl/Time/HiRes.pm line 31.
Subroutine import redefined at /usr/lib/perl5/site_perl/Time/HiRes.pm line 49.
Subroutine tv_interval redefined at /usr/lib/perl5/site_perl/Time/HiRes.pm line 70.
.Could not split line["H\"rW{0M4K\cV1=YFH\cV\c^rqv\c?\c]hKUe\cGL)4:4\cH]C\cPW`_|#MU4}\c_\c_%\cQ\cN\cX8M}%e\cR|\cG-K\c?~\cAM_cREx#AnvAZDi\$\c\!h\cZ\cI^uG0    )>TQ}p{Q[Ah\cNIK\cV+R"]
Could not split line["-6W/GQp\cOm`>UwBP[5"]
Could not split line["\@\cPI\cW,(zY2]uA!fVegsf\\V\cGfL\cHY4ki\cFvLgY\\\c\Ed\cK\cTe-\cC0\@d!?\cSU/\\G8\cAt?(\cY.L\cZ\cBrtl~s[4\@\cF\cWu*D>I"]
Could not split line["hb\cSKA1\cCjX(w/K\cA"]
Giving up parsing your /root/.cpan/sources/modules/02packages.details.txt.gz, too many errorsTerminal does not support GetHistory.
Lockfile removed.

It says that the 02packages.details.txt.gz file is missing, but it looks like it's there -

ls /root/.cpan/sources/modules/
02packages.details.txt.gz  03modlist.data.gz

I thought I might uninstall and reinstall perl but I got dependency errors and I'm not game to force an uninstall unless I get advice to do so -

pacman -Rs perl
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: automake: requires perl
:: cdrkit: requires perl
:: ddclient: requires perl
:: git: requires perl>=5.14.0
:: groff: requires perl
:: gtk-doc: requires perl
:: hspell: requires perl
:: hyphen: requires perl
:: imagemagick: requires perl
:: lm_sensors: requires perl
:: mod_perl: requires perl
:: openssl: requires perl
:: perl-algorithm-diff: requires perl
:: perl-archive-zip: requires perl>=5.10.0
:: perl-class-factory-util: requires perl
:: perl-class-inspector: requires perl>=5.6.0
:: perl-class-load: requires perl
:: perl-class-methodmaker: requires perl>=5.10.0
:: perl-class-singleton: requires perl>=5.10.0
:: perl-convert-binhex: requires perl
:: perl-data-dump: requires perl>=5.006
:: perl-data-optlist: requires perl-scalar-list-utils
:: perl-datetime-format-builder: requires perl
:: perl-dbi: requires perl
:: perl-digest-sha1: requires perl
:: perl-email-date-format: requires perl
:: perl-encode-locale: requires perl>=5.008
:: perl-error: requires perl>=5.10.0
:: perl-fcgi: requires perl
:: perl-file-listing: requires perl>=5.8.8
:: perl-file-slurp: requires perl>=5.14.0
:: perl-font-afm: requires perl>=5.5.0
:: perl-html-form: requires perl>=5.8.8
:: perl-html-formattext: requires perl>=5.10.0
:: perl-html-parser: requires perl>=5.12.1
:: perl-html-tagset: requires perl>=5.10.0
:: perl-html-tree: requires perl>=5.10.0
:: perl-http-cache-transparent: requires perl>=5.10.0
:: perl-http-cookies: requires perl>=5.8.8
:: perl-http-daemon: requires perl>=5.8.8
:: perl-http-date: requires perl>=5.8.8
:: perl-http-message: requires perl>=5.8.8
:: perl-http-negotiate: requires perl>=5.8.8
:: perl-image-size: requires perl
:: perl-io-socket-ssl: requires perl>=5.10.0
:: perl-io-string: requires perl>=5.10.0
:: perl-io-stringy: requires perl
:: perl-libwww: requires perl>=5.8.1
:: perl-lingua-en-numbers-ordinate: requires perl>=5.10.0
:: perl-lingua-preferred: requires perl>=5.10.0
:: perl-linux-pid: requires perl
:: perl-list-moreutils: requires perl>=5.5.30
:: perl-lwp-mediatypes: requires perl>=5.6.2
:: perl-lwp-protocol-https: requires perl>=5.8.1
:: perl-math-round: requires perl
:: perl-mime-lite: requires perl
:: perl-mime-types: requires perl
:: perl-mozilla-ca: requires perl>=5.006
:: perl-net-http: requires perl>=5.6.2
:: perl-net-upnp: requires perl
:: perl-package-stash: requires perl>=5.8.1
:: perl-package-stash: requires perl-scalar-list-utils
:: perl-package-stash-xs: requires perl>=5.8.1
:: perl-params-classify: requires perl>=5.10.1
:: perl-params-util: requires perl>=5.5.30
:: perl-params-validate: requires perl
:: perl-parse-recdescent: requires perl>=5.10.0
:: perl-perl4-corelibs: requires perl>=5.006
:: perl-soap-lite: requires perl
:: perl-socket6: requires perl
:: perl-sub-exporter: requires perl>=5.6.0
:: perl-sub-install: requires perl
:: perl-sub-uplevel: requires perl
:: perl-term-readkey: requires perl
:: perl-test-warn: requires perl>=5.10.0
:: perl-text-iconv: requires perl
:: perl-timedate: requires perl
:: perl-tk: requires perl
:: perl-unicode-string: requires perl
:: perl-unicode-utf8simple: requires perl>=5.10.0
:: perl-uri: requires perl>=5.10.0
:: perl-www-robotrules: requires perl>=5.8.1
:: perl-xml-dom: requires perl>=5.10.0
:: perl-xml-namespacesupport: requires perl
:: perl-xml-parser: requires perl
:: perl-xml-regexp: requires perl
:: perl-xml-sax: requires perl
:: perl-xml-sax-base: requires perl
:: perl-xml-simple: requires perl
:: perl-xml-twig: requires perl
:: perl-xml-writer: requires perl
:: perl-xml-xpath: requires perl
:: perl-yaml: requires perl>=5.10.0
:: perl-yaml-syck: requires perl
:: rsync: requires perl
:: system-tools-backends: requires perl
:: webmin: requires perl

Any help would be greatly appreciated.

Thanks

belbo

Last edited by belbo (2012-08-26 00:33:52)

Offline

#2 2012-08-26 12:56:15

juster
Forum Fellow
Registered: 2008-10-07
Posts: 195

Re: Script cannot find perl Data:Dumper module

You probably have Data::Dumper installed under site_perl, along with an old Time::HiRes according to your cpan output. The cpan shell installs modules under site_perl. They are harder to uninstall than packaged modules because you have to remove them manually by deleting the files. I'd recommend using either cpan or perl packaged modules but not both. Since you obviously have many packaged perl modules, delete the site_perl modules:

rm -rf /usr/lib/perl5/site_perl/* /usr/share/perl5/site_perl/*

Here is a script which will show you which files are being loaded when you try to load a module. Run it on Data::Dumper if you want to see if it is indeed under site_perl.

#!/usr/bin/env perl
unless(@ARGV){
  print STDERR "usage: wheremod [module name...]\n";
  exit 2;
}
for $m (@ARGV){
  ($p = $m) =~ s{::}{/}g;
  for $i (@INC){
    print "$m $i/$p.pm\n" if(-f "$i/$p.pm");
  }
}
exit 0;

If that doesn't work, try loading Data::Dumper yourself to see what is actually going on, making note of any errors:

perl -MData::Dumper -e1

Offline

#3 2012-08-27 13:01:39

belbo
Member
From: Sydney, Australia
Registered: 2011-02-25
Posts: 51

Re: Script cannot find perl Data:Dumper module

Thanks

Results as follows -

perl -MData::Dumper -e1
Perl API version v5.14.0 of Data::Dumper does not match v5.16.0 at /usr/lib/perl5/site_perl/XSLoader.pm line 95.
Compilation failed in require.
BEGIN failed--compilation aborted.
$ perl /mnt/Data/Scripts/Perl_Module_Check.pl wheremod Data::Dumper
Data::Dumper /usr/lib/perl5/site_perl/Data/Dumper.pm
Data::Dumper /usr/lib/perl5/core_perl/Data/Dumper.pm

I ran the full delete command after backing up the directories (there was a lot in them)

rm -rf /usr/lib/perl5/site_perl/* /usr/share/perl5/site_perl/*

This resulted in a different missing module -

$ sudo rm -rf /usr/lib/perl5/site_perl/* /usr/share/perl5/site_perl/*
$ ~/.shepherd/shepherd --check

ERROR:
Mandatory module 'List::Compare' not found.

I restored the backup and deleted only Data::Dumper but then got a missing XMLTV module -

$ ~/.shepherd/shepherd --check
$[ used in numeric lt (<) (did you mean $] ?) at /usr/share/perl5/site_perl/XML/Twig.pm line 7278.
$[ used in numeric lt (<) (did you mean $] ?) at /usr/share/perl5/site_perl/XML/Twig.pm line 7284.
$[ used in numeric lt (<) (did you mean $] ?) at /usr/share/perl5/site_perl/XML/Twig.pm line 7296.

ERROR:
Mandatory module 'XMLTV' not found.

Following this post, I did the following, which returned no results -
https://bbs.archlinux.org/viewtopic.php?pid=1110598

$ sudo pacman -Qml | awk '/_perl\/auto\/.+\.so$/ { print $1 }' | uniq

I then did the following -

$ sudo rm -rf /usr/lib/perl5/*
$ sudo pacman -S perl
warning: perl-5.16.1-1 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...

Targets (1): perl-5.16.1-1

Total Installed Size:   48.33 MiB
Net Upgrade Size:       0.00 MiB

Proceed with installation? [Y/n]
(1/1) checking package integrity                                                               [#######################################################] 100%
(1/1) loading package files                                                                    [#######################################################] 100%
(1/1) checking for file conflicts                                                              [#######################################################] 100%
(1/1) checking available disk space                                                            [#######################################################] 100%
(1/1) upgrading perl                                                                           [#######################################################] 100%
$ ~/.shepherd/shepherd --check

ERROR:
Mandatory module 'XMLTV' not found.

Oops. Then saw your next post saying not to do that as you'd lose the vendor modules, which I did. I had backed up so I restored, so still have the vendor stuff.

In case its of any assistance, this is what my perl lib and share directories look like -

[ben@htpc ~]$ ls /usr/lib/perl5
core_perl  site_perl  site_perl.bak  vendor_perl
[ben@htpc ~]$ ls /usr/lib/perl5/site_perl
Alien      auto      Data    Encode     encoding.pm  Filter          List  Net     perlfilter.pod  SVN  Term  Unicode  version.pm   XML
Attribute  Compress  Digest  Encode.pm  FCGI.pm      filter-util.pl  Math  Params  Storable.pm     Sys  Time  version  version.pod  XSLoader.pm
[ben@htpc ~]$ ls /usr/lib/perl5/vendor_perl
Apache   Attribute  Crypt               DateTimePP.pm  dbixs_rev.pl  GD.pm  Image  ModPerl       Package  SNMP.pm     Text   Unicode  YAML
Apache2  auto       DateTime            DBD            Digest        gv.pm  JSON   mod_perl2.pm  Params   Socket6.pm  Tie    Win32
APR      Bundle     DateTime.pm         DBI            FCGI.pm       gv.so  Linux  Net           qd.pl    SVN         Tk     Xfce4
APR.pm   Class      DateTimePPExtra.pm  DBI.pm         GD            HTML   List   NetSNMP       RRDs.pm  Term        Tk.pm  XML
[ben@htpc ~]$ ls /usr/lib/perl5/core_perl
arybase.pm     Compress         Cwd.pm      DynaLoader.pm  Fcntl.pm      I18N    List          ODBM_File.pm  perllocal.pod  Socket.pm    threads.pm
attributes.pm  Config_git.pl    Data        Encode         File          IO      Math          Opcode.pm     POSIX.pm       Storable.pm  Tie
auto           Config_heavy.pl  DB_File.pm  Encode.pm      Filter        IO.pm   MIME          O.pm          re.pm          Sys          Time
B              Config.pm        Devel       encoding.pm    GDBM_File.pm  IPC     mro.pm        ops.pm        Scalar         Text         Unicode
B.pm           CORE             Digest      Errno.pm       Hash          lib.pm  NDBM_File.pm  PerlIO        SDBM_File.pm   threads
[ben@htpc ~]$ ls /usr/share/perl5/
core_perl  site_perl  vendor_perl
[ben@htpc ~]$ ls /usr/share/perl5/core_perl
AnyDBM_File.pm  bignum.pm       Config          Digest.pm     fields.pm      IO          Object          PerlIO.pm       Term           utf8.pm
App             bigrat.pm       constant.pm     DirHandle.pm  File           IPC         open.pm         pod             Test           vars.pm
Archive         blib.pm         CPAN            Dumpvalue.pm  FileCache.pm   JSON        overload        Pod             Test.pm        version
Attribute       bytes_heavy.pl  CPANPLUS        dumpvar.pl    FileHandle.pm  less.pm     overloading.pm  Safe.pm         Text           Version
autodie         bytes.pm        CPANPLUS.pm     Encode        filetest.pm    Locale      overload.pm     Search          Thread         version.pm
autodie.pm      Carp            CPAN.pm         encoding      Filter         locale.pm   Package         SelectSaver.pm  Thread.pm      vmsish.pm
AutoLoader.pm   Carp.pm         DBM_Filter      English.pm    FindBin.pm     Log         Params          SelfLoader.pm   Tie            warnings
AutoSplit.pm    CGI             DBM_Filter.pm   Env.pm        Getopt         Math        parent.pm       sigtrap.pm      Time           warnings.pm
autouse.pm      CGI.pm          DB.pm           Exporter      HTTP           Memoize     Parse           sort.pm         Unicode        XSLoader.pm
B               _charnames.pm   deprecate.pm    Exporter.pm   I18N           Memoize.pm  Perl            strict.pm       unicore
base.pm         charnames.pm    Devel           ExtUtils      if.pm          Module      perl5db.pl      subs.pm         UNIVERSAL.pm
Benchmark.pm    Class           diagnostics.pm  Fatal.pm      inc            Net         perlfaq.pm      Symbol.pm       User
bigint.pm       Compress        Digest          feature.pm    integer.pm     NEXT.pm     PerlIO          TAP             utf8_heavy.pl
[ben@htpc ~]$ ls /usr/share/perl5/site_perl
Alien      bigint.pm  Bundle  Class     CPANPLUS     DateTime  ExtUtils  HTML  IPC   Locale       LWP.pm      Math     MythTV     Object  Try  YAML
Archive    bignum.pm  CGI     Compress  CPANPLUS.pm  Encode    File      HTTP  JSON  LWP          lwptut.pod  Module   MythTV.pm  Test    WWW  YAML.pm
Attribute  bigrat.pm  CGI.pm  CPAN      Date         Env.pm    Filter    IO    List  lwpcook.pod  Mail        Mozilla  Net        Tie     XML
[ben@htpc ~]$ ls /usr/share/perl5/vendor_perl
abbrev.pl    bigrat.pl    ctime.pl  Error          Font         HTML          LWP.pm        open2.pl       SOAP        Time          validate.pl
Algorithm    cacheout.pl  Data      Error.pm       ftp.pl       HTTP          Mail          open3.pl       stat.pl     timelocal.pl  WWW
Apache       CGI          Date      exceptions.pl  getcwd.pl    Image         Math          Package        Sub         Tree          XML
Archive      CGI.pm       DateTime  fastcwd.pl     getopt.pl    importenv.pl  MIME          Parse          syslog.pl   Try           XMLRPC
assert.pl    chat2.pl     Dist      File           getopts.pl   IO            Module        Perl4          tainted.pl  UDDI          XMLTV
auto         Class        dotsh.pl  finddepth.pl   Git          Lingua        Mozilla       pwd.pl         Term        Unicode       XMLTV.pm
bigfloat.pl  complete.pl  Email     find.pl        Git.pm       look.pl       Net           RRDp.pm        termcap.pl  URI           YAML
bigint.pl    Convert      Encode    flush.pl       hostname.pl  LWP           newgetopt.pl  shellwords.pl  Test        URI.pm        YAML.pm

Any further assistance would be greatly appreciated.

Thanks

belbo

Last edited by belbo (2012-08-27 13:40:14)

Offline

#4 2012-08-29 22:44:31

juster
Forum Fellow
Registered: 2008-10-07
Posts: 195

Re: Script cannot find perl Data:Dumper module

Sorry if this is too late a response to help you. I forgot to subscribe.

The shepherd --check command can obviously give misleading information. In the first case Data::Dumper was reported as missing but in fact it was found. The more accurate problem was that it could not be loaded. You saw it existed with the little script I made you and the perl -M... command gave you a more accurate error message. These two approaches will in fact more accurately tell you if a module is found.

The main problem you are facing is that your installed modules are older than your installed perl. The old modules that are incompatible with perl need to be rebuilt and reinstalled. Data::Dumper was an obvious module because it was a recurring problem. There are a couple of different ways you can fix this. This way is the most straightforward:

1) Remove the contents of both site_perl directories.
2) Reinstall all of the modules that you need.

Uninstalling modules installed with the cpan shell is a non-feature so the only way you can do this is removing the files manually. Sorry. If you want uninstallation features you can use official perl packages or packages from the AUR. You can also generate packages on the fly by installing the perl-cpanplus-dist-arch package and using the cpanp shell to install modules.

When reinstalling modules, you should use packages because they seem to be easier to understand and they are more organized when installed. Check on the AUR or check for official packages if you are not using perl-cpanplus-dist-arch. Finding packages that correspond to modules is usually straight-forward. For example, List::Compare is provided by the perl-list-compare module on the AUR.

If you want to walk the way less traveled you can try to trace the problem-causing modules individually. Start by loading the XMLTV module manually as I showed you with Data::Dumper and use cpan to update the modules.

Offline

#5 2012-08-30 08:18:59

belbo
Member
From: Sydney, Australia
Registered: 2011-02-25
Posts: 51

Re: Script cannot find perl Data:Dumper module

Sorry if this is too late a response to help you. I forgot to subscribe.

Not a problem. Thanks for responding. Not too late. I switched over to MythTV's EIT program guide functionality in the meantime but find Shepherd's guide information more detailed, conforming and complete so would like to fix this and return to using it.

The shepherd --check command can obviously give misleading information. In the first case Data::Dumper was reported as missing but in fact it was found. The more accurate problem was that it could not be loaded. You saw it existed with the little script I made you and the perl -M... command gave you a more accurate error message. These two approaches will in fact more accurately tell you if a module is found.

The main problem you are facing is that your installed modules are older than your installed perl. The old modules that are incompatible with perl need to be rebuilt and reinstalled. Data::Dumper was an obvious module because it was a recurring problem.

Understood.

There are a couple of different ways you can fix this. This way is the most straightforward:

1) Remove the contents of both site_perl directories.
2) Reinstall all of the modules that you need.

No problem in theory. The issue for me at the moment is (2). ie I'm not sure how to figure out what modules I actually need.

I'm concerned that if I delete as suggested I might run into issues with these other perl-dependent apps.

pacman -Rs perl
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: automake: requires perl
:: cdrkit: requires perl
:: ddclient: requires perl
:: git: requires perl>=5.14.0
:: groff: requires perl
:: gtk-doc: requires perl
:: hspell: requires perl
:: hyphen: requires perl
:: imagemagick: requires perl
:: lm_sensors: requires perl

...

:: rsync: requires perl
:: system-tools-backends: requires perl
:: webmin: requires perl

I'm sure I'm missing an important bit of understanding, but to my perl-ignorant mind, the 'way less traveled' seems to make more sense for that reason ie

you can try to trace the problem-causing modules individually. Start by loading the XMLTV module manually as I showed you with Data::Dumper and use cpan to update the modules.

I don't know how to use cpan to update a module, but that shouldn't be too hard to read up on.

What I get when I run the load script you gave me is this-

# perl XMLTV -e1
Can't open perl script "XMLTV": No such file or directory
# perl /mnt/Data/Scripts/Perl_Module_Check.pl wheremod XMLTV
XMLTV /usr/share/perl5/vendor_perl/XMLTV.pm

Regardless, presumably I need to update it like this (?)

https://wiki.archlinux.org/index.php/XM … le_by_hand

or from the AUR (https://aur.archlinux.org/packages.php?ID=10062)

... and then keep on going in this fashion with each Shepherd-check error until its working again (?)

Last edited by belbo (2012-08-30 08:22:00)

Offline

#6 2012-08-30 12:39:45

juster
Forum Fellow
Registered: 2008-10-07
Posts: 195

Re: Script cannot find perl Data:Dumper module

Perl installs modules into three different categories. Under the core_perl dir are the modules that are included with the perl binary itself. These are distributed by the perl package. The site_perl dir contains modules that are installed with the cpan shell and/or the CPAN module, which the cpan shell uses indirectly. The vendor_perl dir is where packaged perl modules install their files. This directory structure is mirrored under /usr/lib/perl5 which contains platform dependent modules and /usr/share/perl5 which are platform-independent.

Removing the contents of both site_perl directories will have no effect on packaged perl modules (like XMLTV). Perl modules depend upon perl itself and often upon other perl modules. The required perl modules are required in the form of packages, so their files are located under vendor_perl. Packages that depend on perl are also not effected.

Another possible problem is the precedence of the three module categories. site_perl has a higher priority than vendor_perl, which has a higher priority than core_perl. Your copy of Data::Dumper in site_perl was loaded instead of the copy of Data::Dumper in core_perl, which caused problems because the copy in site_perl was built for the old version of perl.

Regardless of how you installed shepherd and its dependencies you should reinstall it after removing site_perl. I suspect that you used the xmltv package when it was in the official [community] repository but now it has been moved out to the AUR. Use the AUR package you found.

PS You forgot the -M in the perl command. It is like so:

perl -MXMLTV -e1

Offline

#7 2012-08-30 13:14:07

belbo
Member
From: Sydney, Australia
Registered: 2011-02-25
Posts: 51

Re: Script cannot find perl Data:Dumper module

Thanks for the help. This seems pretty complicated so I shuoldn't be trying to progress it at 11pm at night while feeling tired. I'll just post what I've done tonight and then take it all back to the drawing board when I have a bit more time to work throught it. Thanks for the pointer re the missing -M.

$yaourt -S xmltv
...
Comment by: StefanHusmann on Sat, 12 Mar 2011 19:57:32 +0000
moved from [community]
...
==> Extracting Sources...
  -> Extracting xmltv-0.5.61.tar.bz2 with bsdtar
==> Starting build()...
Perl API version v5.14.0 of Term::ReadKey does not match v5.16.0 at /usr/lib/perl5/core_perl/DynaLoader.pm line 213.
Compilation failed in require at lib/Ask/Term.pm line 9.
BEGIN failed--compilation aborted at lib/Ask/Term.pm line 9.
Compilation failed in require at Makefile.PL line 244.
==> ERROR: A failure occurred in build().
    Aborting...
...
$perl /mnt/Data/Scripts/Perl_Module_Check.pl wheremod Term::ReadKey
Term::ReadKey /usr/lib/perl5/site_perl/Term/ReadKey.pm
Term::ReadKey /usr/lib/perl5/vendor_perl/Term/ReadKey.pm
...
$ sudo mv /usr/lib/perl5/site_perl/Term/ReadKey.pm /usr/lib/perl5/site_perl/Term/ReadKey.pm.delete
$ yaourt -S perl-term-readkey
warning: perl-term-readkey-2.30.02-2 is up to date -- reinstalling
...
$ perl -MTerm::ReadKey   -e1
Perl API version v5.14.0 of Term::ReadKey does not match v5.16.0 at /usr/lib/perl5/core_perl/DynaLoader.pm line 213.
Compilation failed in require.
BEGIN failed--compilation aborted.
...

Last edited by belbo (2012-08-30 13:16:04)

Offline

#8 2012-08-30 20:39:10

juster
Forum Fellow
Registered: 2008-10-07
Posts: 195

Re: Script cannot find perl Data:Dumper module

Term::ReadKey still has files installed under /usr/lib/perl5/site_perl/auto. You don't need perl-term-readkey because it's in the core, which my script showed you.

Remove the contents of the site_perl directories and reinstall what you need with packages.

Offline

#9 2012-08-31 08:02:21

belbo
Member
From: Sydney, Australia
Registered: 2011-02-25
Posts: 51

Re: Script cannot find perl Data:Dumper module

Remove the contents of the site_perl directories and reinstall what you need with packages.

I understand this is what you've been suggesting all along. However I have a number of perl-dependent packages, not just Shepherd. I'm concerned that the others will break when I remove the site_perl's and then how much time and effort it will take to fix them - while the packages are out of action. At the moment the only thing that is broken is Shepherd. Dealing with that is relatively easy. (a) I've got an alternative solution while it's broken and (b) it tells me what it needs. So why not just delete each problematic site_perl module and deal with those on a one-by-one basis? If I knew how to quickly determine which modules I need if other packages break I suppose it wouldn't be such an issue, but how do I determine what I need for the non-Shepherd packages if they break when the site_perl's are deleted ?

Re

I deleted it from site_perl, so now I have -

$perl /mnt/Data/Scripts/Perl_Module_Check.pl wheremod Term::ReadKey
Term::ReadKey /usr/lib/perl5/vendor_perl/Term/ReadKey.pm

But then I get this -

$ perl -MTerm::ReadKey   -e1
Perl API version v5.14.0 of Term::ReadKey does not match v5.16.0 at /usr/lib/perl5/core_perl/DynaLoader.pm line 213.
Compilation failed in require.
BEGIN failed--compilation aborted.

I thought that because it was not up-to-date I needed to reinstall it - but reinstalling it puts a copy in site_perl which you say I don't need because it is in core (albeit out of date). How do I resolve the out-of-date module in core ?

Thanks

belbo

Last edited by belbo (2012-08-31 08:12:40)

Offline

#10 2012-09-06 05:01:23

belbo
Member
From: Sydney, Australia
Registered: 2011-02-25
Posts: 51

Re: Script cannot find perl Data:Dumper module

Any chance of a response to my last post? I would really appreciate it as I would like to get Shepherd going again but don't want to muck up the other perl-dependent packages in my system (for too long anyway).

Thanks

belbo

Offline

#11 2012-09-08 13:02:25

belbo
Member
From: Sydney, Australia
Registered: 2011-02-25
Posts: 51

Re: Script cannot find perl Data:Dumper module

Well Shepherd appears to be fixed. I followed your instructions and removed the site_perl directories. I then isntalled xmltv from the AUR (with yaourt). Then Shepherd complained about List::Compare being missing. So I installed perl-list-compare from the AUR. After that Shepherd ran. Thanks for the help. However, I am still concerned that my other packages that depend on perl might be broken owing to the removal of the site_perl directories. Presumably I need to run those invididually and check - or is there reason to believe they would not have been affected ?

Offline

#12 2012-09-10 10:37:28

dave00
Member
Registered: 2010-01-03
Posts: 24

Re: Script cannot find perl Data:Dumper module

Handy info Juster, I long ago used cpan to install some items which I didn't think to check AUR for and after the last perl upgrade ran into issues much like belbo. I'll have to go over this thread and attempt cleaning up cpan and reinstalling everything from packages only. Guessing it will take a bit of time though as I have a lot of stuff in site_perl.

Offline

#13 2012-09-10 11:19:15

laumars
Member
Registered: 2008-02-28
Posts: 27

Re: Script cannot find perl Data:Dumper module

When you installed from cpan, you tried to install in lower case. However cpan modules are case sensitive. Did you try install Data::Dumper or just data::dumper in lower case?

Offline

#14 2012-09-12 12:04:12

dave00
Member
Registered: 2010-01-03
Posts: 24

Re: Script cannot find perl Data:Dumper module

juster wrote:

Remove the contents of the site_perl directories and reinstall what you need with packages.

Have just done this and reinstalled from main repo's and AUR. Then ran your script on all the modules I use to verify they were found. No problems!

Thanks for your efforts, much appreciated.

Offline

Board footer

Powered by FluxBB