Perlbrew on Linux (Ubuntu 18.10)
I have a new computer with Ubuntu 18.10 on it. It comes with perl 5.26, but I wanted to brew my own perl.
sudo apt-get install perlbrew
List the available versions of perl:
Brew (install) perl 5.28.1:
$ perlbrew install perl-5.28.1
The response is
Fetching perl 5.28.1 as /home/gabor/perl5/perlbrew/dists/perl-5.28.1.tar.gz Download http://www.cpan.org/src/5.0/perl-5.28.1.tar.gz to /home/gabor/perl5/perlbrew/dists/perl-5.28.1.tar.gz ERROR: Failed to download http://www.cpan.org/src/5.0/perl-5.28.1.tar.gz
Oh. That's not good.
mkdir -p perl5/perlbrew/dists
Now this works:
perlbrew install perl-5.28.1
At this point you should be able to switch to the newly intsalled perl using
perlbrew switch perl-5.28.1
and it works, but it also prints this, and the switch is only temporary. I think this should be a permanent switch. As I recall it used to be a permanent switch.
A sub-shell is launched with perl-5.28.1 as the activated perl. Run 'exit' to finish it.
Anyway, not too optimal workaround is to add this
to the ~/.bashrc file.
Published on 2018-12-28