needed to install a clean version of perl on my Mac computer running on Mac OS X Snow Leopard. first i installed macports. (www.macports.org) for snow leapord (using the dmg file):

https://distfiles.macports.org/MacPorts/

(This file was what i used to install on my computer: MacPorts-1.9.2-10.6-SnowLeopard.dmg)

Then next i tried to installed the perl source code for mac os x from the official site.

http://www.perl.org/get.html#osx

downloaded the file: perl-5-2.14.2.tar

Next untar the downloaded file:

tar xzvf perl-5-2.14.2.tar

then typed the following command:

sudo port install perl5

and got this message:

dlopen(/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib, 10): Li +brary not loaded: /usr/lib/libcurl.4.dylib Referenced from: /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dyli +b Reason: Incompatible library version: Pextlib.dylib requires version 7 +.0.0 or later, but libcurl.4.dylib provides version 6.0.0 while executing "load /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib" ("package ifneeded Pextlib 1.0" script) invoked from within "package require Pextlib 1.0" (file "/opt/local/bin/port" line 39)

(The above command actually worked for me on a Mac OS X Lion computer albeit i did get a couple of warnings.)

so then i typed the commands given in the README file for installation:

./Configure -des -Dprefix=$HOME/localperl make test make install

This works fine and i see a clean version of perl installed in a sub-directory called localperl. The problem is that when i type

which perl in the command line it keeps pointing to the native installation of perl. That is, on typing which perl in command line, i get /usr/bin/perl

how do i get it to point to the clean version of perl which i had installed since i wish to install a software which is dependent on Perl and also a few additional CPAN modules which i will need to install on the clean version of perl i have downloaded as well. As i understand i should retain the native Perl because some of my system files are dependent on it.

Please help, Monks!


In reply to installing clean version of Perl on Mac Snow leopard problems by Phantom123

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.