Welcome to WebmasterWorld Guest from 54.226.25.231

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

need direction on adding 2 modules to perl

perl mod install help

     

Jay1025

10:29 pm on Mar 2, 2009 (gmt 0)

5+ Year Member



I want to install a captcha app that requires:

GD.pm: GD.pm 2.01 or later (with PNG support) &
Digest::MD5

This is on freebsd and a "pkg_info" now shows...

digest-20010807_2 MD5/SHA-1/RIPEMD-160 checksumming utility

gd-1.8.4_6 A graphics library for fast image creation

gd-2.0.1_3 A graphics library for fast creation of images

How to I install or tell perl about the "digest" and "gd-2.01" packages?

I am a newbie and simple instructions would help. I spent time on this and am thinking I just do the following?

as root...
1.) # perl -MCPAN -e shell
2.) cpan > install ?

Not sure how to specifiy 2 needs packages above?
Then how do I exit out and is that it or what else am I missing?

Thanks,
Jay

phranque

7:35 am on Mar 3, 2009 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld [webmasterworld.com], Jay!

you probably don't need to go through cpan to install that package on freebsd.
try the pkg_add [freebsd.org] command and that will probably take care of all those dependencies for you.

Jay1025

2:31 pm on Mar 3, 2009 (gmt 0)

5+ Year Member



hmmm...well the first thing I did was a pkg_info which didn't show any of my needed reqirements. So i went into the ports dir and successfully did "make install" and then the packages showed on a pkg_info command.

My thinking is they are now installed and perl should see them...but when I run the cgi in the error logs I get errors on the line numbers that reference the GD package.

So I thought somehow perl needed to be told about these new packages.

I thought me running pkg_add would be equivelant to what I did with "make install" which was successful?

Comments?..and thanks for your response...Jay

Jay1025

3:09 pm on Mar 3, 2009 (gmt 0)

5+ Year Member



here is the actail error from apache....

Can't locate GD.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.8.0/mach /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.0/BSDPAN /usr/local/lib/perl5/5.8.0/mach /usr/local/lib/perl5/5.8.0 .) at captcha.pl line 42.
BEGIN failed--compilation aborted at captcha.pl line 42.
Compilation failed in require at /usr/local/www/cgi-bin/cgi/captchatest.cgi line 33.
[Tue Mar 3 07:06:11 2009] [error] [client 72.70.108.229] Premature end of script headers: /usr/local/www/cgi-bin/cgi/captchatest.cgi

Jay1025

3:11 pm on Mar 3, 2009 (gmt 0)

5+ Year Member



files are in correct ascii vs bin mode
permissions on scripts are correct...

The can't find GD.pm makes me think perl can't find it etc.

Jay1025

4:36 pm on Mar 3, 2009 (gmt 0)

5+ Year Member



I got this working..operator error...gd-2.0.1_3 is not the same as GD.pm..once I actually found and installed it..it worked fine.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month