CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
How to configure perl 5.12.4 by reading from a file or EOF trick

 



oscarjiao
Novice

Nov 19, 2012, 7:51 AM

Post #1 of 6 (1789 views)
How to configure perl 5.12.4 by reading from a file or EOF trick Can't Post

I am trying to install Perl under Linux manually since I need to specify particular flags and install thread version. However there are too many steps so I would like to use EOF to install or read these options from a text file.

when I do ./Configure << EOF and input all the information needed for each step, I got the error: Say 'sh Configure', not 'sh <Configure'

I tried to read from a file too by "./Configure << input.txt", still the same error.

What is going on here? EOF method works for me when I was trying to install other softwares.


(This post was edited by oscarjiao on Nov 19, 2012, 7:58 AM)


rovf
Veteran

Nov 21, 2012, 1:18 AM

Post #2 of 6 (1778 views)
Re: [oscarjiao] How to configure perl 5.12.4 by reading from a file or EOF trick [In reply to] Can't Post

Well,


Quote
./Configure << input.txt


wouldn't read from a file input.txt, but would define a HERE-document with the string input.txt as a sentinel. Also, it is not clear to me what you mean by use EOF to install.

From your line


Quote
./Configure << EOF


I assume that you do want to use a HERE document, but the error message you quote, doesn't fit in. I suggest that you upload a screenshot showing what you are actually doing.


oscarjiao
Novice

Nov 25, 2012, 2:46 PM

Post #3 of 6 (1758 views)
Re: [rovf] How to configure perl 5.12.4 by reading from a file or EOF trick [In reply to] Can't Post

Here what I did below:

Code
login1$ ./Configure << EOF 
> carriage
> EOF
Say 'sh Configure', not 'sh <Configure'
login1$ vi install-read.txt
login1$ ./Configure < install-read.txt
Say 'sh Configure', not 'sh <Configure'

Technically, I should put the answers for every prompt questions here before EOF (same for reading from a file), but I got the same error


rovf
Veteran

Nov 25, 2012, 11:52 PM

Post #4 of 6 (1731 views)
Re: [oscarjiao] How to configure perl 5.12.4 by reading from a file or EOF trick [In reply to] Can't Post

So, basically, you just did a


Code
echo carriage | ./Configure


, just in a more complicated way. I don't quite understand, *why* you are doing it, but as to the error message you get, one more question:

What happens if you just enter


Code
./Configure


on the command line?


oscarjiao
Novice

Nov 26, 2012, 8:08 AM

Post #5 of 6 (1729 views)
Re: [rovf] How to configure perl 5.12.4 by reading from a file or EOF trick [In reply to] Can't Post

I don't have any problem compile it with "./Configure" and going through all the q&a at all.

As a matter of fact, I am trying to build a rpm for perl. This will be installed by the admin of this cluster we have. So we need to automate everything including giving all the answers to the promt questions ahead of time. That is the purpose why I was doing it this way.

I didn't have any problems installing similar softwares with a lot of questions by reading from a file or using EOF. Somehow it didn't work for Perl. I guess a workaround is to install perl first with ./Configure and go through all the steps and bundle the config.sh file into the rpm, so it will install perl based on whatever information is saved in config.sh.


rovf
Veteran

Nov 26, 2012, 1:59 PM

Post #6 of 6 (1719 views)
Re: [oscarjiao] How to configure perl 5.12.4 by reading from a file or EOF trick [In reply to] Can't Post

Another idea: What does the #! line of the configure script say?

Maybe it's worth checking the command interpreter (ls -l etc.).

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives