A clean install of Ubuntu 8.04. I've installed a new perl under /opt/perl. The
john@ubuntu:~/perl-5.10.1$./Configure -des -Dprefix=/opt/perl john@ubuntu:~/perl-5.10.1$make john@ubuntu:~/perl-5.10.1$make test john@ubuntu:~/perl-5.10.1$make install
appeared to run fine except for install which complained about permissions. Not sure what to do I
john@ubuntu:~$cd /opt john@ubuntu:~$sudo mkdir perl john@ubuntu:~$sudo chmod 777 perl
and then the make install ran fine. I created a link
john@ubuntu:~$cd /usr/local/bin john@ubuntu:~$sudo ln -isv /opt/perl/bin/perl perl
john@ubuntu:~$ls -l /usr/local/bin/perl lrwxrwxrwx 1 root root 18 2010-02-28 10:50 /usr/local/bin/perl -> /opt +/perl/bin/perl
This gave me:
john@ubuntu:~$/usr/local/bin/perl -e 'print "$]\n";' 5.010001 john@ubuntu:~$/usr/bin/perl -e 'print "$]\n";' 5.008008
So far so good, but
john@ubuntu:~$perl -e 'print "$]\n";' 5.008008
which wasn't what I was expecting. And worse
john@ubuntu:~$sudo perl -e 'print "$]\n";' 5.010001
The path is (extract)
john@ubuntu:~$echo $PATH /usr/local/bin: ... /usr/bin: ...
Can anyone see how I managed to screw it up? And is it possible to straighten it out? Do you need any more info?

fwiw, I'm looking to convert some cgi apps to mod_perl. I'm renting a cheap VPS as a "sandbox" but before I let myself loose on that I've set up a spare box with the same OS. At the back of my mind is how to tell Apache/mod_perl to use the perl under /opt/perl. But I fear I have a long way to go before I need worry about that (e.g. learning unix and fighting vim). :-)

As always, thanks in advance.

Updated: corrected the paths in the first code block


In reply to Permissions for a separately installed perl by wfsp

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.