Koozali.org: home of the SME Server

Obsolete Releases => SME 9.x Contribs => Topic started by: LANMonkey on March 08, 2016, 09:13:36 PM

Title: [Solved] PERL script can't find mod in fresh reinstallation and restore
Post by: LANMonkey on March 08, 2016, 09:13:36 PM
I have had to do a fresh installation of 9.1 and a restore from backup of an old SME server that was updated several time.  I don't recall whether it was 8.x or 9.x.  But now I run a script that ran every day on the old system and I am getting errors:

Can't locate Statistics/Descriptive.pm in @INC (@INC contains: /root/perl/mod /home/e-smith/files/ibays/xxxxxxxx1/files/perl/mod /home/e-smith/files/ibays/xxxxxxxx2/files/perl/mod /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at /home/e-smith/files/ibays/xxxxxxxx1/files/perl/mod/xxxx.pm line 21.

I thought that the backup did not include the package I installed from dag, but I installed the package again and I am still getting the same message.

https://forums.contribs.org/index.php/topic,46182.msg268216.html#msg268216

I've tried,

[root@xxxx ~]# perl -e "user Statistics::Descriptive"
Can't locate object method "user" via package "Statistics::Descriptive" (perhaps you forgot to load "Statistics::Descriptive"?) at -e line 1.


Does this indicate the package is not installed?

What is going wrong, or how can I find out what is going wrong?
Title: Re: PERL script can't find mod in fresh reinstallation and restore
Post by: CharlieBrady on March 08, 2016, 10:34:07 PM
I've tried,

[root@xxxx ~]# perl -e "user Statistics::Descriptive"
Can't locate object method "user" via package "Statistics::Descriptive" (perhaps you forgot to load "Statistics::Descriptive"?) at -e line 1.


Does this indicate the package is not installed?

What is going wrong, or how can I find out what is going wrong?

You have two problems. First you are doing "user Statistics::Descriptive" when you really want "use Statistics::Descriptive;".

Secondly, you do not have the Statistics::Descriptive module installed.

Try a google search for 'perl(Statistics::Descriptive) el6 rpm'. You might find a pre-built rpm which provides the missing module.
Title: Re: PERL script can't find mod in fresh reinstallation and restore
Post by: CharlieBrady on March 08, 2016, 10:35:20 PM
I thought that the backup did not include the package I installed from dag, but I installed the package again and I am still getting the same message.

Maybe you installed the wrong version of the rpm.
Title: Re: PERL script can't find mod in fresh reinstallation and restore
Post by: LANMonkey on March 09, 2016, 12:08:10 AM
Maybe you installed the wrong version of the rpm.

I am following the same procedure I followed the first time in this post,

https://forums.contribs.org/index.php/topic,46182.msg227410.html#msg227410

I was using the old el4 repository.  I found the el6 repository, installed that and reinstalled perl-Statistics-Descriptive and I am getting an error.  For some reason it keeps trying to install the el4 version and I can see at the el6 site that there is an el6 version available.

[root@xxxxxx ~]# yum --enablerepo=dag install perl-Statistics-Descriptive
Loaded plugins: fastestmirror, smeserver
Setting up Install Process
Loading mirror speeds from cached hostfile
....
dag                                                      | 1.9 kB     00:00
Not using downloaded repomd.xml because it is older than what we have:
  Current   : Thu Jul 10 18:58:34 2014
  Downloaded: Thu Jul 10 18:47:20 2014
....

Dependencies Resolved

....
Installing:
 perl-Statistics-Descriptive     noarch     3.0.100-1.el4.rf      dag      24 k

....
Downloading Packages:
http://apt.sw.be/redhat/el6/en/i386/dag/RPMS/perl-Statistics-Descriptive-3.0.100-1.el4.rf.noarch.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.

Error Downloading Packages:
  perl-Statistics-Descriptive-3.0.100-1.el4.rf.noarch: failure: RPMS/perl-Statistics-Descriptive-3.0.100-1.el4.rf.noarch.rpm from dag: [Errno 256] No more mirrors to try.

But I am showing the right repository,

[root@xxxxxx ~]# db yum_repositories show dag
dag=repository
    BaseURL=http://apt.sw.be/redhat/el6/en/$basearch/dag
    EnableGroups=no
    Exclude=freetype,htop,iptraf,rsync,syslinux
    GPGCheck=yes
    GPGKey=http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
    Name=Dag - EL6
    Visible=no
    status=disabled
[root@xxxxxx ~]#

Title: Re: PERL script can't find mod in fresh reinstallation and restore
Post by: Stefano on March 09, 2016, 05:58:57 AM
Code: [Select]
yum --enablerepo=* clean all
Title: Re: PERL script can't find mod in fresh reinstallation and restore
Post by: LANMonkey on March 09, 2016, 06:10:51 PM
Code: [Select]
yum --enablerepo=* clean all

That did it.

I ran yum --enablerepo=* clean all and then ran yum --enablerepo=dag install perl-Statistics-Descriptive and I see that my el6 version is to be installed.   When I run perl -e "use Statistics::Descriptive", I get no errors.
Title: Re: PERL script can't find mod in fresh reinstallation and restore
Post by: Stefano on March 09, 2016, 06:41:44 PM
It's a "feature" of yum.. the clean directive works only on enabled repos