LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-22-2004, 08:26 AM   #1
zajaco0
LQ Newbie
 
Registered: Jul 2004
Location: Kentucky
Distribution: FC4
Posts: 18

Rep: Reputation: 0
perl module problems


I am running RH 7.3, perl 5.6.1, and Bastille Linux. I am trying to get the perl module RRDs.pm to work in a script that I am using. I can get this module to load correctly using
Code:
use RRDs;
in the script by running the script as root. When I try to run the script as a normal user, I get

Code:
Can't locate loadable object for module RRDs in @INC (@INC contains: /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.6.1/i386-linux /usr/lib/perl5/vendor_perl/5.6.1 /usr/lib/perl5/vendor_perl .) at test.pl line 3
Compilation failed in require at test.pl line 3.
BEGIN failed--compilation aborted at test.pl line 3.

here is the script im trying to run:
Code:
#!/usr/bin/perl

use RRDs;
...script ran as root:

[root@netflow neteng]# perl -c test.pl
test.pl syntax OK
 
Old 10-22-2004, 11:02 AM   #2
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
1) check permissions on RRDs.pm
--ls -l RRDs.pm
* i think this is your solution, but in case not, keep reading

2) I ran into a similar problem on a web host i once had... i worked around inability to load modules by the 'use' command on modules i had written by the following:
Code:
BEGIN{
        require "/full/path/to/module.pm";
        eval('"/full/path/to/module.pm"->import()');
}
# the above replaces the below
#use module.pm;
 
Old 10-22-2004, 12:53 PM   #3
zajaco0
LQ Newbie
 
Registered: Jul 2004
Location: Kentucky
Distribution: FC4
Posts: 18

Original Poster
Rep: Reputation: 0
the test.pl file
Code:
#!/usr/bin/perl

BEGIN{
        require "/home/neteng/RRDs.pm";
        eval('"/home/neteng/RRDs.pm"->import()');
}

permissions of module
[neteng@netflow neteng]$ ll RRDs.pm
-rw-rw-rw- 1 neteng neteng 3514 Oct 22 13:39 RRDs.pm


[neteng@netflow neteng]$ perl -c test.pl
Can't locate loadable object for module RRDs in @INC (@INC contains: /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.6.1/i386-linux /usr/lib/perl5/vendor_perl/5.6.1 /usr/lib/perl5/vendor_perl .) at test.pl line 6
Compilation failed in require at test.pl line 6.
BEGIN failed--compilation aborted at test.pl line 8.

Ran as root:
[root@netflow neteng]# perl -c test.pl
test.pl syntax OK


it's not the fact that it's not finding the module. I have had that error before....it says Cannot locate file RRDs.pm. This is actually a different error, where it says "Cannot locate loadable module"
I think it has something to do with bastille linux.

ive spent about 20+ hrs on this problem, im about ready to reformat and not use bastille.

~Zach
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with perl module for w3c validator to work on my local Apache+PHP+perl instal tbamt Linux - Software 0 12-16-2004 05:37 PM
Problems Installing Perl GD module kaplan71 Linux - Software 0 08-19-2004 02:17 PM
Problems with installing GD perl module. Related to libgd installation. Chiabert Linux - Newbie 0 10-03-2003 01:19 PM
Perl module IO::File problems... nuzzy Linux - Software 0 08-18-2003 09:14 AM
Gtk-Perl: Problems getting pixbuf module to install wackman Linux From Scratch 1 06-08-2003 11:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration