LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-28-2004, 01:24 AM   #16
immolate
LQ Newbie
 
Registered: Jun 2004
Location: Sydney, Australia
Distribution: Redhat
Posts: 19

Original Poster
Rep: Reputation: 0

Ok so..

Which module do I download?
Where do I put it?

After I've downloaded it and put it somewhere, I just type:
perl -eshell -MCPAN?

Am I correct?

Again I'm very sorry.
 
Old 06-28-2004, 01:28 AM   #17
immolate
LQ Newbie
 
Registered: Jun 2004
Location: Sydney, Australia
Distribution: Redhat
Posts: 19

Original Poster
Rep: Reputation: 0
Ok weird.. A CPAN dir is in /usr/lib/perl5/5.8.0 :/

Last edited by immolate; 06-28-2004 at 01:31 AM.
 
Old 06-28-2004, 01:28 AM   #18
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,276

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
No, first become root, then run perl -MCPAN -e shell then type install CGI::Carp (before you can do this, you will be prompted to set up how CPAN downloads and installs modules -- if in doubt, go with the defaults, they;re very reasonable). The perl -MCPAN -e shell command launches a little shell that allows you to easily update the Perl on your system and install new modules. This is what you need to do here.

[edit]

Just saw your last post -- the Carp may not be the same as CGI::Carp, particularly if it's not in a directory called CGI. Try the steps above anyhow.

Last edited by btmiller; 06-28-2004 at 01:30 AM.
 
Old 06-28-2004, 01:35 AM   #19
immolate
LQ Newbie
 
Registered: Jun 2004
Location: Sydney, Australia
Distribution: Redhat
Posts: 19

Original Poster
Rep: Reputation: 0
As I said before, when I type perl -MCPAN -e shell I get this:

Can't locate CPAN.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
.).
BEGIN failed--compilation aborted.

So what do I do from here? I'm so totally lost.
 
Old 06-28-2004, 01:50 AM   #20
immolate
LQ Newbie
 
Registered: Jun 2004
Location: Sydney, Australia
Distribution: Redhat
Posts: 19

Original Poster
Rep: Reputation: 0
I downloaded CPAN and put it all in the right directories.. I typed perl -MCPAN -e shell and I get this..

CPAN is the world-wide archive of perl resources. It consists of about
100 sites that all replicate the same contents all around the globe.
Many countries have at least one CPAN site already. The resources
found on CPAN are easily accessible with the CPAN.pm module. If you
want to use CPAN.pm, you have to configure it properly.

If you do not want to enter a dialog now, you can answer 'no' to this
question and I'll try to autoconfigure. (Note: you can revisit this
dialog anytime later by typing 'o conf init' at the cpan prompt.)

Are you ready for manual configuration? [yes]

Do I have to config it?
 
Old 06-28-2004, 01:53 AM   #21
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,276

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Probably, but don't worry, it's mostly painless (as I said, just accept the defaults if in doubt). Don't worry, you're almost there now . Of course, you can try your luck with the default configuration and go back and do it by hand if something goes wrong.
 
Old 06-28-2004, 01:58 AM   #22
immolate
LQ Newbie
 
Registered: Jun 2004
Location: Sydney, Australia
Distribution: Redhat
Posts: 19

Original Poster
Rep: Reputation: 0
Okay.. cool.. so what now?
 
Old 06-28-2004, 01:58 AM   #23
pa_ash
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Rep: Reputation: 0
try running apache only and run the script

Have u done chmod on the script files? the x bit should be on
second try:

rename scripts with .pl extension, think doesnt make much difference.
r ur scripts running from ....\www?

try tweaking the httpd.conf
 
Old 06-28-2004, 02:02 AM   #24
pa_ash
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Rep: Reputation: 0
have u added
use CGI
in the first line of ur scripts.
if u dont have the CGI module, its everywhere on the net
 
Old 06-28-2004, 02:06 AM   #25
immolate
LQ Newbie
 
Registered: Jun 2004
Location: Sydney, Australia
Distribution: Redhat
Posts: 19

Original Poster
Rep: Reputation: 0
have u added
use CGI

What do you mean? What should the first line of my scripts look like?
 
Old 06-28-2004, 02:53 AM   #26
immolate
LQ Newbie
 
Registered: Jun 2004
Location: Sydney, Australia
Distribution: Redhat
Posts: 19

Original Poster
Rep: Reputation: 0
[Mon Jun 28 16:48:38 2004] [error] [client 203.18.0.2] Premature end of script headers: gm.cgi
[Mon Jun 28 16:48:39 2004] [error] [client 203.18.0.2] Premature end of script headers: gm.cgi
[Mon Jun 28 16:48:42 2004] [error] [client 203.18.0.2] Premature end of script headers: gm.cgi
[Mon Jun 28 16:48:47 2004] [error] [client 203.18.0.2] Premature end of script headers: links.pl
[Mon Jun 28 16:48:50 2004] [error] [client 203.18.0.2] Premature end of script headers: links.pl

That's from the error log.. this is so annoying! lol. What does that mean? I've downloaded and installed the module from the CPAN shell. Everything is setup, I think.

Last edited by immolate; 06-28-2004 at 03:04 AM.
 
Old 06-28-2004, 01:58 PM   #27
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
I see you managed to get CPAN installed. When you said in your last post that you got the modules installed - was that by running "install CGI::Carp" from teh "cpan>" prompt?
 
Old 06-28-2004, 05:08 PM   #28
immolate
LQ Newbie
 
Registered: Jun 2004
Location: Sydney, Australia
Distribution: Redhat
Posts: 19

Original Poster
Rep: Reputation: 0
Yep.

Thanks for all your help guys, much appreciated.
 
Old 06-29-2004, 01:32 PM   #29
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Does the shebang line (first line in the script) point to your perl executable?
 
Old 06-30-2004, 07:09 AM   #30
immolate
LQ Newbie
 
Registered: Jun 2004
Location: Sydney, Australia
Distribution: Redhat
Posts: 19

Original Poster
Rep: Reputation: 0
Ok, this is just crap.

I had CGI files in cgi-bin, deleted them, reinstalled them now I get that "Premature end of script headers: gm.cgi" error. Why?
 
  


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
installing cgi perl to get lynx working hypnotiks Linux - Newbie 1 12-19-2004 03:06 PM
Help on installing Speedy CGI on FC2 john_drayton Fedora 0 10-01-2004 05:53 AM
CGI to work out side of cgi-bin? crashedspine Linux - Newbie 13 09-02-2004 09:49 PM
Trouble installing CGI scripts shaggystyle Linux - Networking 7 01-13-2004 03:38 PM
http://www.burstnet.com/cgi-bin/ads/ad7954a.cgi/3980/RETURN-CODE rverlander LQ Suggestions & Feedback 1 06-07-2002 08:35 AM


All times are GMT -5. The time now is 06:39 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration