Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Installing Perl 5.10.0: problems with ./Configure

by almut (Canon)
on May 07, 2008 at 14:06 UTC ( #685218=note: print w/replies, xml ) Need Help??


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

This is really weird... Is your sh maybe symlinked/aliased to some other interpreter? Can you run any other sh-shell script properly?

Replies are listed 'Best First'.
Re^2: Installing Perl 5.10.0: problems with ./Configure
by why_bird (Pilgrim) on May 07, 2008 at 15:29 UTC

    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
    .......
      ... '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
        .......

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2023-09-23 17:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?