in reply to Re^3: path to perl on umbuntu
in thread path to perl on umbuntu

I will definitely read the install and readme files prior to installation but I can't find them :) The only perl download I can find for ubuntu 10.10 is this one http://packages.ubuntu.com/maverick/perland it doesn't have an install guide and this is perl 5.10

Also this list of dependencies refers to some modules I have already installed on the linux machine using apt-get. Does that matter? Can they share these files? For example I have already installed make.

Many thanks

Replies are listed 'Best First'.
Re^5: path to perl on umbuntu
by marto (Cardinal) on Oct 27, 2010 at 14:43 UTC

    As I said, you'll need to compile your own, rather than use a packaged version. Download the latest stable source from here. Extract it to your home directory. Read the Readme and Install files and report back if you have any problems.

      I imagine I'll definitely have problems! Can you try explaining to me again why I need to compile my own and why I can't use a packaged version? I did find this link to 5.8

      http://packages.ubuntu.com/hardy/perl
      This is going to be hard as I couldn't even understand your link for the source code. However I found this page http://www.cpan.org/src/README.html I have downloaded the file for 5.8 and it says I need to do the following:
      ./Configure -des -Dprefix=$HOME/localperl make test make install
      What directory do i need to be in when i run these commands and where does my perl 5.8.9 folder which I downloaded need to be relative to this?

      There was a specific readme file for linux but that is talking about Experimental Support for Sun Studio Compilers for Linux OS. Does that concern me?

      Many thanks

        The link I gave was to the download page for the source code. You aren't going to use Sun Studio compiler, it's safe to ignore this warning.

        • Click here. Archive Manager will allow you to extract this to your home folder.
        • Click on Applications->Accessories->terminal
        • type cd perl-5.12.2 press return or enter
        • type ./Configure -des -Dprefix=$HOME/localperl (or whatever path you want, this should be fine), press return or enter
        • type make test then press return or enter
        • type make install then press return or enter

        If all goes well it should install to $HOME/localperl, if you have any specific errors let us know.

        Can you try explaining to me again why I need to compile my own and why I can't use a packaged version?

        If you are just going to use perl and the packaged installation provides what you need (maybe all you need is the core distribution if you are just beginning to learn Perl), then you can certainly use the packaged version of perl.

        If you want to add or update modules and you are using the packaged version that came with your system, then you should use your systems package management to add or update the modules. As long as you stick to your system's package management system, you should not have any problems. Many of the commonly used packages from CPAN are available from the package management system for ubuntu/debian based systems and you may not need anything else.

        If you use the perl provided by your systems package management system (/usr/bin/perl), then you should be cautious about installing or upgrading modules from CPAN independently of the package management system. You can end up with conflicts that are hard to resolve. Some parts of your ubuntu (I am assuming umbunto is a typo) system depend on perl and you might even break these. This is the root cause of the advice to install your own perl.

        If you want freedom to change the configuration of perl and install modules from CPAN that are not available from your package management system, then you will minimize the risk of problems arising from interference with your system's package management and the requirements of other applications which presume perl will be as installed by the package management system, if you build perl from source yourself and install it to an alternate location. But, if you are just beginning to learn about Perl and Linux you will have quite a bit to learn and even the "simple" task of installing the required tools, compiling and installing perl and learning how cpan works may be more than you want to tackle just now. It's easy, once you know everything you need to know, but a bit mysterious and time consuming until you do.

        Me again. The install file says I need to use these commands and I am not sure if they are equivalent to the above

        sh Configure -de make make test make install
        The code in my last post is looking in a different location isn't it by calling ./Configure?