Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Welcome to the Monastery
 
PerlMonks  

automating perl installation

by ansh batra (Friar)
on Oct 10, 2011 at 06:40 UTC ( #930539=perlquestion: print w/ replies, xml ) Need Help??
ansh batra has asked for the wisdom of the Perl Monks concerning the following question:

hi monks
i am planning to write a perl script to automatically install perl from source on ubuntu 11.04. while configuring i want to give values(not defaults) at some place. i dont know which file i should edit or how shold i give input there.
please help me
other suggestions regarding this task are aslo welcomed

Comment on automating perl installation
Re: automating perl installation
by ikegami (Pope) on Oct 10, 2011 at 06:58 UTC

    Some common options can be provided as parameters to Configure (e.g. thread support). See INSTALL. INSTALL also mentions:

    =head2 Site-wide Policy settings After Configure runs, it stores a number of common site-wide "policy" answers (such as installation directories) in the Policy.sh file. If you want to build perl on another system using the same policy defaults, simply copy the Policy.sh file to the new system's perl build directory, and Configure will use it. This will work even if Policy.sh was generated for another version of Perl, or on a system with a different architecture and/or operating system. However, in such cases, you should review the contents of the file before using it: for example, your new target may not keep its man pages in the same place as the system on which the file was generated. Alternatively, if you wish to change some or all of those policy answers, you should rm -f Policy.sh to ensure that Configure doesn't re-use them. Further information is in the Policy_sh.SH file itself. If the generated Policy.sh file is unsuitable, you may freely edit it to contain any valid shell commands. It will be run just after the platform-specific hints files.

    Does that help?

      but i want to change defaults at following 4 places
      Installation prefix to use?(~name OK)/usr/local /usr
      Set Directories to use for library searches ? /usr/local/lib /lib /usr/lib
      what libraries to use ? none -lnsl -ldl -lm -lcrypt -lutil -lc
      Build a shared libperl.so(y/n)n y

      policy.sh is showing only installation prefix.

        After running Configure, it says

        If you compile perl5 on a different machine or from a different object directory, copy the Policy.sh file from this object directory to the new one before you run Configure -- this will help you with most of the policy defaults.

        Sounds like you can run Configure once and copy Policy.sh around.

Re: automating perl installation
by pvaldes (Hermit) on Oct 26, 2011 at 16:42 UTC
    i am planning to write a perl script to automatically install perl from source on ubuntu 11.04

    You can save the effort, apt-src do exactly this for you. In fact perl is installed at the same time that Ubuntu

    After the README.gz file you can positively run configure with extra options (i.e:  ./Configure -des -Dprefix=$HOME/localperl)

    "If you run into any trouble whatsoever or you need to install a customized version of Perl, you should read the detailed instructions in the "INSTALL" file that came with this distribution."

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://930539]
Approved by Paladin
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2014-04-23 11:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (541 votes), past polls