homepage Welcome to WebmasterWorld Guest from 54.147.196.159
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
need direction on adding 2 modules to perl
perl mod install help
Jay1025

5+ Year Member



 
Msg#: 3861312 posted 10:29 pm on Mar 2, 2009 (gmt 0)

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

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



 
Msg#: 3861312 posted 7:35 am on Mar 3, 2009 (gmt 0)

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

5+ Year Member



 
Msg#: 3861312 posted 2:31 pm on Mar 3, 2009 (gmt 0)

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

5+ Year Member



 
Msg#: 3861312 posted 3:09 pm on Mar 3, 2009 (gmt 0)

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

5+ Year Member



 
Msg#: 3861312 posted 3:11 pm on Mar 3, 2009 (gmt 0)

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

5+ Year Member



 
Msg#: 3861312 posted 4:36 pm on Mar 3, 2009 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved