Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

how to install perl 5.10.1 on ubuntu9.10?

by fxbird (Initiate)
on Nov 16, 2009 at 13:36 UTC ( [id://807453]=perlquestion: print w/replies, xml ) Need Help??

fxbird has asked for the wisdom of the Perl Monks concerning the following question:

Hi everyone,I'm newbie to perl. I'm gonna install perl 5.10.1 on ubuntu9.10,because didn't find a bina +ry edition for ubuntu, I download a source and run make command after + Configure.Then I encounter below error:<br> make[1]: *** [../../lib/auto/B/B.so] Error 1 make[1]: Leaving directory `/root/Downloads/soft/perl-5.10.1/ext/B' Unsuccessful make(ext/B): code=512 at make_ext.pl line 360. make: *** [lib/auto/B/B.so] Error 25 I don't know how to figure it out. Any ideas? thanks.

Replies are listed 'Best First'.
Re: how to install perl 5.10.1 on ubuntu9.10?
by Corion (Patriarch) on Nov 16, 2009 at 13:48 UTC

    This is not enough of the error message. The real error happened further up.

    Please post more of the output, preferrably enclosed in between <code>...</code> tags so it renders and downloads nicely.

Re: how to install perl 5.10.1 on ubuntu9.10?
by wazoox (Prior) on Nov 16, 2009 at 13:48 UTC

    Hello and welcome to the monastery. Please enclose your code examples and similar between <code> tags</code> for the sake of readability.

    What is the exact Configure and make option you used? Did you follow the README and INSTALL instructions?

      Hi, I do as the install file says,
      1)sh Configure 2)make ,the installation path is /opt/perl, other options are kept + default, then I encounter those errors . I don't know what other inf +o I can offer.
      The perl within ubuntu 9.10 only have core modules ,so I try to install a new one. Actually I'm new to linux too.:-)

        Unless you have a good reason to replace the version of Perl shipped with your OS, I'd suggest you leave it alone and build another version elsewhere on your system. Every now and then someone does this and causes problems for their OS. See Re: Uninstalling / installing perl for further discussion on this topic.

        You haven't given us enough information, as Corion suggested, you need to show us the output make produces, the part you have posted isn't enough for us to help. I think it's likely that you have a lot information output by make relating to this issue. See Writeup Formatting Tips regarding how to format posts properly. The easier it is for people to read, the more likely they'll be able to help you.

        Martin

Re: how to install perl 5.10.1 on ubuntu9.10?
by przemo (Scribe) on Nov 16, 2009 at 22:38 UTC

      Hello, the mod_paths.diff mentioned in that page can not be downloaded,500 error is encountered.

        Hello, the mod_paths.diff mentioned in that page can not be downloaded,500 error is encountered.

        Thanks for the info, corrected links and added note about possible future "breakage".

Re: how to install perl 5.10.1 on ubuntu9.10?
by gmargo (Hermit) on Nov 16, 2009 at 13:56 UTC

    If you're a newbie to perl, why in the world do you need perl 5.10.1? What's wrong with the 5.10.0 that's already installed on your system?

      Installing your own perl is one of the steps to becoming not-a-newbie.
Re: how to install perl 5.10.1 on ubuntu9.10?
by Anonymous Monk on Nov 18, 2009 at 18:11 UTC

    To install your own Perl, follow these steps:

    sudo su - cd /opt mkdir perl-5.10.1 mkdir src cd src wget http://cpan.org/src/perl-5.10.1.tar.gz tar xzf perl-5.10.1.tar.gz cd perl-5.10.1 rm -f config.sh Policy.sh ./Configure -Dprefix=/opt/perl-5.10.1 make make test make install cd /opt ln -s perl-5.10.1 perl exit

    And you're done. Do not add /opt/perl/bin to your (or root's) $PATH.

    To install modules for your own Perl, use /opt/perl/bin/cpanp. Never use /usr/bin/cpanp or /usr/bin/cpan. (To install Perl modules for the system Perl, continue to use aptitude.)

    Always use the fully-qualified shebang line at the beginning of scripts that you explicitly want to use /opt/perl/bin/perl:

    #!/opt/perl/bin/perl ...

      Do not add /opt/perl/bin to your (or root's) $PATH.

      What is wrong with prepending own's Perl bin dir to $PATH (not root's, agreed)? I do it all the time, no problems so far.

      Always use the fully-qualified shebang line at the beginning of scripts that you explicitly want to use /opt/perl/bin/perl:

      OK, this shows the occasional use-case for custom Perl. However, if you want your scripts to be portable, do not hard-code paths. Instead, set $PATH and use something like

      #!/usr/bin/env perl

      which is much more portable.

        What is wrong with prepending own's Perl bin dir to $PATH (not root's, agreed)?

        Gah. I really need to create an account here so I can edit my posts. You're right, thanks for the correction. I should've written "Do not add /opt/perl/bin to root's $PATH". As you point out, prepending it to your own (not-root) $PATH works great.

        The only reason I can think of that you might not want to add it to your own (not root) $PATH is that, when logged in as yourself, you'll get used to always automatically getting /opt/perl/bin/perl, and then when you log in as root, you'll run some code may forget that you're back to getting /usr/bin/perl. :)

        do not hard-code paths

        You should always hard-code paths as part of the install process, otherwise use /your/favorite/perl yourperlprogram

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-24 20:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found