Difference between revisions of "Perlbrew"
From Asenjo
(Created page with "== Installing a system-wide perlbrew Perl == [http://gugod.org/2010/12/a-shared-perlbrew-root-for-multiple-users perlbrew for multiple users] # create a directory where perlb...") |
m |
||
Line 32: | Line 32: | ||
</pre></code> | </pre></code> | ||
− | After this, just install a new Perl version. You will need a c compiler | + | After this, just install a new Perl version. You will need a c compiler, make and patch |
Revision as of 13:37, 8 July 2012
Installing a system-wide perlbrew Perl
- create a directory where perlbrew will install the new Perl version:
# mkdir /opt/perl5 [enter]
I chose to do it in /opt/perl5; if we change the permissions on this directory, we do not need to run the rest as root.
- declare a (temporary) environment variable PERLBREW_ROOT
$ export PERLBREW_ROOT=/opt/perl5
- download the perlbrew script and run it:
$ curl -L http://xrl.us/perlbrewinstall | bash [enter]
$ /opt/perlbrew/bin/perlbrew init [enter]
I actually reviewed the script before executing it, do not just run stuff off the internet without knowing what you are doing.
- modify your login script
In my case I use the bash shell, so I modified my .bashrc file:
export PERLBREW_ROOT=/opt/perl5
source /opt/perl5/etc/bashrc
source /opt/perl5/etc/perlbrew-completion.bash
After this, just install a new Perl version. You will need a c compiler, make and patch