Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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

Replies are listed 'Best First'.
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 file. If you want to build perl on another system using the same policy defaults, simply copy the file to the new system's perl build directory, and Configure will use it. This will work even if 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 to ensure that Configure doesn't re-use them. Further information is in the Policy_sh.SH file itself. If the generated 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 y 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 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 around.

Re: automating perl installation
by pvaldes (Chaplain) 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://930539]
Approved by Paladin
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2018-05-26 22:21 GMT
Find Nodes?
    Voting Booth?