not doing good with the install

i am on a student login with no root priveledges and i am trying to run a perl script that
utilized GD and DBI at a different institution.  I have a friend who has given me a shell
account that has a MySQL database that i can connect to remotely.  don't ask me to
install anything on my home linux box because i have a win95 machine that isn't
even mine that runs ssh secure shell fine  i tried to save all the gz's for DBD, DBI, and GD
in a directory.. umm..


/afs/> ls
DBD-mysqlPP-0.04          DBI-1.38.tar              perl-DBI-1.30-1.i386.rpm
DBD-mysqlPP-0.04.tar      GD-2.11
DBI-1.38                  GD-2.11.tar

(note the full path prompt i have with a .profile for ksh)

you can see what i have done.. i did make and install.. and it didn't like DBI because
it didn't have DBD so i did that. the web page *.cgi wasn't viewing thru a browser
so i tried the command line method:

/afs/> lab8_graph.cgi > outGD
Can't locate loadable object for module DBI in @INC (@INC contains: /afs/ /usr/local/lib/perl5/5.6.1/sun4-solaris /usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .) at line 255
BEGIN failed--compilation aborted at line 255.
Compilation failed in require at line 9.
BEGIN failed--compilation aborted at line 9.
Compilation failed in require at lab8_graph.cgi line 8.
BEGIN failed--compilation aborted at lab8_graph.cgi line 8.

my script is "lab8_graph.cgi" it utilizes a personal module called ""

furthermore, i thought i would get cute by fixing @INC in like so...
here is the first lines of that file:

package DBIGraph;
my $module_path = "/afs/";
@INC = push(@INC,"${module_path}/GD-2.11");
@INC = push(@INC,"${module_path}/DBI-1.38");
use Exporter;
use FileHandle;
use CGI qw(:standard);
#use modules/DBI-1.38/DBI;
use DBI;
#use GD::Graph::lines;
#use modules/GD-2.11/GD;#::Image;
use GD;#::Image;

but i still get the error seen above.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

One of those error messages is complaining that it can't locate a "loadable object module" for DBI. That indicates that there is a component of DBI which must be compiled as part of the installation of the module. The question this message raises is whether you successfully ran the "make install" stage for the DBI module. Are the DBI-1.38 and GD-2.11 directories where you unzipped these packages or the destination PREFIX you gave to tell where to install the modules?

Check out the "use lib" pragmatic module. This is the preferred way to add library paths to the @INC array.

See the Perl FAQ item named "How do I keep my own module/library directory?"; it's in section 8 of the FAQ.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
you need to fix @INC in your script, something like:
  BEGIN{ unshift(@INC, q(/your/path/to/modules)); }
kayveyAuthor Commented:
i am thinking this means that i have not successfully installed:  

/afs/> lab8_graph.cgi > outGD did not return a true value at lab8_graph.cgi line 8.
BEGIN failed--compilation aborted at lab8_graph.cgi line 8.

i am not suprised.  okay.. ::sigh::

/afs/> make test > maketest
Segmentation Fault - core dumped
        Using DBI::PurePerl (DBI_PUREPERL=2)
 Taint mode switching tests skipped

okay.. this is obviously bad:

/bin/sh -c true
/bin/sh -c true
/bin/sh -c true
PERL_DL_NONLAZY=1 /bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.6.1/
sun4-solaris -I/usr/local/lib/perl5/5.6.1 -e 'use Test::Harness qw(&runtests $ve
rbose); $verbose=0; runtests @ARGV;' t/*.t
        Test returned status 0 (wstat 139, 0x8b)
        test program seems to have generated a core
        Test returned status 0 (wstat 139, 0x8b)
        test program seems to have generated a core
        Test returned status 0 (wstat 139, 0x8b)
        test program seems to have generated a core
DIED. FAILED tests 1-18
        Failed 18/18 tests, 0.00% okay
        Test returned status 0 (wstat 139, 0x8b)
        test program seems to have generated a core
DIED. FAILED tests 1-3
        Failed 3/3 tests, 0.00% okay

CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Well, the first message you got, about not returning a true value, is just a small bug in your module. Most modules end with the line


to satisfy this particular requirement of returning a true value.

As to the rest, yes, it does look like there's a problem with your DBI installation.
kayveyAuthor Commented:
i thought i put a "1" in there.. at some point i did..

umm.. so what do i do about the install problems?
It's hard to tell what went wrong with your DBI/DBD installation.

Without something more specific to go on, all I can suggest is to do it over, carefully reading the recipe given in the README files, and paying attention to any error messages coming from the 'make' and 'make test' steps. Be sure not to forget the PREFIX= parameter that will tell the install step where you want to place the results, since you're installing a private version of the library.
> .. what do i do about the install problems?
if you have no root permissions, you need to install the modules somewhere local (in your home directory for example).
In this case you have to expand your @INC properly, as I described.
If the modules are instaled in the directory where your script starts, you may also use:
  use lib map("./lib$_", '', '/site_perl', '/perl5', '/perl5/site_perl');
(instead of my BEGIN{} suggestion).
kayveyAuthor Commented:
okay.. shine on that platform.  i am a lot closer on my friend's server

he has the DB working i guess.. but now we are having a hard time with GD::Graph::Lines

use DBI;
use GD::Graph::lines;
use GD;#::Image;

@ISA = Exporter;

sub new {
   $class = shift;
   $ref = {};
   bless $ref, $class;
   return $ref;

sub display {
   my $now = `date` ;
   my $this = shift;
"" 203L, 5211C written                            
[kayve@main public_html]$ ./lab8_graph.cgi > out
Can't locate object method "new" via package "GD::Graph::lines" (perhaps you forgot to load "GD::Graph::lines"?) at line 171.
[kayve@main public_html]$

above you can see that i exited from and then tried to run the script at the command line.
you can see that has a use line for GD::Graph::lines so this error message is rather
confusing.  if that hint the error gives is true, then i don't understand what it means to "load" because
i would assume that "use" would "load" the package.  my friend suggests we have the wrong
lines package so now i am going to look for that.

here is what the actual fiile "lab8_graph.cgi" looks like:

use strict;
#   unshift (@INC, "/pub/cis/dputnam/perl5/lib/site_perl/5.6.1/PA-RISC2.0/");
#   unshift (@INC, "/pub/cis/dputnam/perl5/lib/site_perl/5.6.1/");
#use lib ("/students/kriese01/public_html/cgi-bin");
use DBIGraph;
my $dbi_graph= DBIGraph->new("Test");
your posting is confising too.
Which code did you run?
If it is the last 10 lines, I don't see where you use GD;
Somewhere much farther down in the module than you have shown us, there is apparently an attempt to call a constructor for GD::Graph::lines. That's a bit of an odd capitalization for a class or package for something from CPAN -- "lines" looks more like  method than a class. It may be that you need to construct a GD::Graph object, not a GD::Graph::lines object.

But that's all at first blush, without seeing any of the relevant source code.
Nothing has happened on this question in more than 8 weeks. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
split points [grade B] between jmcg and ahoffman (abandoned, only partly resolved).


EE Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.