Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Installing Perl 5.10.0: problems with ./Configure

by why_bird (Pilgrim)
on May 07, 2008 at 15:29 UTC ( [id://685238]=note: print w/replies, xml ) Need Help??


in reply to Re: Installing Perl 5.10.0: problems with ./Configure
in thread Installing Perl 5.10.0: problems with ./Configure

Maybe this is actually a shell script issue, so I'm sorry if this is the wrong place to ask this (reputation suggests maybe it is?!)

I edited the Configure file so that it read:
#! /bin/sh echo hi there
Then created an identical file from scratch, in the same directory, trivial.sh. trivial.sh worked completely as expected (printed "hi there" on the command line), but the Configure file did this:
./Configure
./Configure: command not found

sh ./Configure
: command not found2:
: command not found3:
hi there
: command not found5:

I found this which talks (near the bottom) about 'DOS style line breaks'. Could this be the problem? If this is not a suitable place for this question, then I'll ask elsewhere (any suggestions?) but I'd appreciate some (more) monkish wisdom if anyone has any..

cheers
why_bird
........
Those are my principles. If you don't like them I have others.
-- Groucho Marx
.......

Replies are listed 'Best First'.
Re^3: Installing Perl 5.10.0: problems with ./Configure
by almut (Canon) on May 07, 2008 at 15:34 UTC
    ... 'DOS style line breaks'. Could this be the problem?

    Actually, yes, playing some more with this (in particular with a csh compatible shell), I do in fact obtain similar effects when the entire script has DOS/Windows style line endings... (just fixing the problem on the shebang line is not sufficient).  Not sure how those \r got in the file... did you edit Configure prior to running it initially?  Anyhow, this should fix the problem (at least with this very file...):

    perl -i -pe 's/\r//g' ./Configure

    (Well, if you already have any perl installed, that is... Otherwise, look for some tool like dos2unix, or similar)

      Ah, lovely, thankyou---I didn't know what the 'DOS style line break' character was in perl. I've already got Perl 5.8.5. I tried to install 5.10.0 back when I started to learn Perl but gave up pretty quickly when I thought I'd need root permissions. I thought it'd be good to have a play around with it now that I'm a bit more experienced.

      thanks!
      ........
      Those are my principles. If you don't like them I have others.
      -- Groucho Marx
      .......
        If the problem was DOS line endings, either you got the source from a bad place or you did something bad in extracting it. Where did you get it and what did you do to extract it?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://685238]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-16 06:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found