Help us understand the problem. What is going on with this article?

plenv+perl-build環境の設定

More than 3 years have passed since last update.

本体のインストール

  • plenv

    $ git clone git://github.com/tokuhirom/plenv.git ~/.plenv

  • ~/.zshenvの設定

    $ sudo vim ~/.zshenv

以下の内容を設定する。

export PATH=$HOME/.plenv/bin:$PATH
eval "$(plenv init -)"
 
  • 設定を反映させる

    $ source ~/.zshenv

  • Perlをビルドするためにperl-buildをインストールする

    $ git clone git://github.com/tokuhirom/Perl-Build.git ~/.plenv/plugins/perl-build/

  • インストール可能なPerlを確認する

    $ plenv install -l

Available versions:
 5.6.0
 5.6.1-TRIAL1
 5.6.1-TRIAL2
 5.6.1-TRIAL3
(省略)
 5.21.5
 5.21.6
 5.21.7
 5.21.8
 5.21.9

Perlのバージョン変更

  • 現在のバージョンの確認

$ perl -v

This is perl 5, version 20,
subversion 1 (v5.20.1) built for armv7l-linux
Copyright 1987-2014, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
 

v5.20.1だということがわかる。
- 現時点の最新版v5.21.9をインストールする

$ plenv install 5.21.9 -Dusethreads

  • デフォルトで使用するバージョンとして設定する

    $ plenv global 5.21.9

  • バージョンが変わったことを確認する

    $ perl -v

This is perl 5, version 21, subversion 9 (v5.21.9) built for armv7l-linux-thread-multi
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2015, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away