{"id":209,"date":"2012-08-09T12:54:40","date_gmt":"2012-08-09T19:54:40","guid":{"rendered":"http:\/\/www.lorrin.org\/blog\/?p=209"},"modified":"2013-03-25T22:48:37","modified_gmt":"2013-03-26T05:48:37","slug":"setting-default-package-versions-with-macports","status":"publish","type":"post","link":"https:\/\/www.lorrin.org\/blog\/2012\/08\/09\/setting-default-package-versions-with-macports\/","title":{"rendered":"Setting default package versions with MacPorts"},"content":{"rendered":"<p>Given a working Perl 5.12 install (via <a href=\"http:\/\/www.macports.org\/\">MacPorts<\/a>), doing a\u00a0<tt>sudo port install perl5.16<\/tt> does not update the <tt>perl<\/tt> symlink:<\/p>\n<pre class=\"brush:shell;gutter:false;toolbar:false\">% ls -alF \/opt\/local\/bin\/perl\r\nlrwxr-xr-x 1 root admin 8 Jun 6 15:19 \/opt\/local\/bin\/perl@ -&gt; perl5.12<\/pre>\n<p>The magic incantation is to install a the <tt>perl5_16<\/tt> <em><a href=\"http:\/\/guide.macports.org\/#using.variants\">variant<\/a><\/em> of the <tt>perl5<\/tt> package:<\/p>\n<pre class=\"brush:shell;gutter:false;toolbar:false\">sudo port install perl5 +perl5_16<\/pre>\n<p>With this done, the symlink is updated and perl loads the expected version.<\/p>\n<pre class=\"brush:shell;gutter:false;toolbar:false\">% ls -alF \/opt\/local\/bin\/perl                                                                                                    \r\nlrwxr-xr-x  1 root  admin  8 Aug  9 12:45 \/opt\/local\/bin\/perl@ -&gt; perl5.16\r\n% perl -v\r\nThis is perl 5, version 16, subversion 0 (v5.16.0) built for darwin-thread-multi-2level<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Given a working Perl 5.12 install (via MacPorts), doing a\u00a0sudo port install perl5.16 does not update the perl symlink: % ls -alF \/opt\/local\/bin\/perl lrwxr-xr-x 1 root admin 8 Jun 6 15:19 \/opt\/local\/bin\/perl@ -&gt; perl5.12 The magic incantation is to install a the perl5_16 variant of the perl5 package: sudo port install perl5 +perl5_16 With this <a href='https:\/\/www.lorrin.org\/blog\/2012\/08\/09\/setting-default-package-versions-with-macports\/' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[37],"tags":[67,91,8],"_links":{"self":[{"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/posts\/209"}],"collection":[{"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/comments?post=209"}],"version-history":[{"count":4,"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/posts\/209\/revisions"}],"predecessor-version":[{"id":246,"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/posts\/209\/revisions\/246"}],"wp:attachment":[{"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/media?parent=209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/categories?post=209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lorrin.org\/blog\/wp-json\/wp\/v2\/tags?post=209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}