Skip to content

Instantly share code, notes, and snippets.

@VincentLiu
Last active March 5, 2018 04:35
Show Gist options
  • Save VincentLiu/464a9c6020ac6a841e65e0616c2be122 to your computer and use it in GitHub Desktop.
Save VincentLiu/464a9c6020ac6a841e65e0616c2be122 to your computer and use it in GitHub Desktop.
How to install plenv on Windows 10 WSL

plenv = Perl binary manager

Use plenv to pick a Perl version for your app. Compared with perlbrew, plenv supports project local version determination.

WSL = Windows Subsystem for Linux -Installation Guide

  1. check Linux version:
lsb_release -a  # Description: Ubuntu 16.04.4 LTS
  1. update WSL (Ubuntu) and install build tools (e.g. make)
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
  1. install plenv
git clone https://github.com/tokuhirom/plenv.git ~/.plenv
echo 'export PATH="$HOME/.plenv/bin:$PATH"' >> ~/.profile
echo 'eval "$(plenv init -)"' >> ~/.profile
exec $SHELL -l
  1. check system perl version:
perl -v
  1. install Perl 5.26.1
plenv help
plenv install --list
plenv install 5.26.1 # this step takes a while
plenv global 5.26.1  # change global default perl to 5.26.1
plenv rehash
perl -v
plenv install-cpanm  # install cpanm for Perl 5.26.1

Perl 5.26.1 is now installed in the home directory, the system’s Perl is intact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment