ものづくりのブログ

うちのネコを題材にしたものづくりができたらいいなと思っていろいろ奮闘してます。

【perl】anyenv を利用した plenv のインストール

plenv コマンドを使って Perl の開発環境を作った時のメモを残します。

セットアップ

anyenv インストール

a1026302.hatenablog.com

plenv インストール

anyenv コマンドを使って、 plenv をインストールします。

$ anyenv install plenv
/tmp/plenv.20221125175444.497408 ~
Cloning https://github.com/tokuhirom/plenv.git master to plenv...
Cloning into 'plenv'...
remote: Enumerating objects: 2138, done.
remote: Counting objects: 100% (28/28), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 2138 (delta 11), reused 18 (delta 5), pack-reused 2110
Receiving objects: 100% (2138/2138), 1.73 MiB | 10.74 MiB/s, done.
Resolving deltas: 100% (716/716), done.
~
~/.anyenv/envs/plenv/plugins ~
Cloning https://github.com/tokuhirom/Perl-Build.git master to perl-build...
Cloning into 'perl-build'...
remote: Enumerating objects: 1443, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 1443 (delta 6), reused 16 (delta 4), pack-reused 1418
Receiving objects: 100% (1443/1443), 3.94 MiB | 25.87 MiB/s, done.
Resolving deltas: 100% (699/699), done.
~

Install plenv succeeded!
Please reload your profile (exec $SHELL -l) or open a new session.

使い方

ヘルプ

$ plenv
plenv 2.3.1-8-gd908472
Usage: plenv <command> [<args>]

Some useful plenv commands are:
   commands            List all available plenv commands
   local               Set or show the local application-specific Perl version
   global              Set or show the global Perl version
   shell               Set or show the shell-specific Perl version
   install             Install a Perl version using the perl-build plugin
   uninstall           Uninstall a specific Perl version
   rehash              Rehash plenv shims (run this after installing executables)
   version             Show the current Perl version and its origin
   versions            List all Perl versions available to plenv
   which               Display the full path to an executable
   whence              List all Perl versions that contain the given executable
   list-modules        List cpan modules in current perl
   migrate-modules     Migrate cpan modules from other version
   install-cpanm       Install cpanm

See `plenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/tokuhirom/plenv#readme

plenv コマンドのバージョン確認

$ plenv --version
plenv 2.3.1-8-gd908472

利用可能なバージョンの確認

$ plenv install -l
Available versions:
 5.37.6
 5.37.5
 5.37.4
 5.37.3
 5.37.2
 5.37.1
 5.37.0
 5.36.0
 5.36.0-RC3
 5.36.0-RC2
 5.35.11
 5.35.10
 5.35.9
 5.35.8
 5.35.7
 5.35.6
 5.35.5
 5.35.4
 5.35.3
 5.35.2
 5.35.1
 5.35.0
 5.34.1
 5.34.1-RC2
 5.34.1-RC1
 5.34.0
 5.34.0-RC2
 5.34.0-RC1
 5.33.9
 5.33.8
 5.33.7
 5.33.6
 5.33.5
 5.33.4
 5.33.3
 5.33.2
 5.33.1
 5.33.0
 5.32.1
 5.32.1-RC1
 5.32.0
 5.32.0-RC1
 5.32.0-RC0
 5.31.11
 5.31.10
 5.31.9
 5.31.8
 5.31.7
 5.31.6
 5.31.5
 5.31.4
 5.31.3
 5.31.2
 5.31.1
 5.31.0
 5.30.3
 5.30.3-RC1
 5.30.2
 5.30.2-RC1
 5.30.1
 5.30.1-RC1
 5.30.0
 5.30.0-RC2
 5.30.0-RC1
 5.29.10
 5.29.9
 5.29.8
 5.29.7
 5.29.6
 5.29.5
 5.29.4
 5.29.3
 5.29.2
 5.29.1
 5.29.0
 5.28.3
 5.28.3-RC1
 5.28.2
 5.28.2-RC1
 5.28.1
 5.28.1-RC1
 5.28.0
 5.28.0-RC4
 5.28.0-RC3
 5.28.0-RC2
 5.28.0-RC1
 5.27.11
 5.27.10
 5.27.9
 5.27.8
 5.27.7
 5.27.6
 5.27.5
 5.27.4
 5.27.3
 5.27.2
 5.27.1
 5.27.0
 5.26.3
 5.26.3-RC1
 5.26.2
 5.26.2-RC1
 5.26.1
 5.26.1-RC1
 5.26.0
 5.26.0-RC2
 5.26.0-RC1
 5.25.12
 5.25.11
 5.25.10
 5.25.9
 5.25.8
 5.25.7
 5.25.6
 5.25.5
 5.25.4
 5.25.3
 5.25.2
 5.25.1
 5.25.0
 5.24.4
 5.24.4-RC1
 5.24.3
 5.24.3-RC1
 5.24.2
 5.24.2-RC1
 5.24.1
 5.24.1-RC5
 5.24.1-RC4
 5.24.1-RC3
 5.24.1-RC2
 5.24.1-RC1
 5.24.0
 5.24.0-RC5
 5.24.0-RC4
 5.24.0-RC3
 5.24.0-RC2
 5.24.0-RC1
 5.23.9
 5.23.8
 5.23.7
 5.23.6
 5.23.5
 5.23.4
 5.23.3
 5.23.2
 5.23.1
 5.23.0
 5.22.4
 5.22.4-RC1
 5.22.3
 5.22.3-RC5
 5.22.3-RC4
 5.22.3-RC3
 5.22.3-RC2
 5.22.3-RC1
 5.22.2
 5.22.2-RC1
 5.22.1
 5.22.1-RC4
 5.22.1-RC3
 5.22.1-RC2
 5.22.1-RC1
 5.22.0
 5.22.0-RC2
 5.22.0-RC1
 5.21.11
 5.21.10
 5.21.9
 5.21.8
 5.21.7
 5.21.6
 5.21.5
 5.21.4
 5.21.3
 5.21.2
 5.21.1
 5.21.0
 5.20.3
 5.20.3-RC2
 5.20.3-RC1
 5.20.2
 5.20.2-RC1
 5.20.1
 5.20.1-RC2
 5.20.1-RC1
 5.20.0
 5.20.0-RC1
 5.19.11
 5.19.10
 5.19.9
 5.19.8
 5.19.7
 5.19.6
 5.19.5
 5.19.4
 5.19.3
 5.19.2
 5.19.1
 5.19.0
 5.18.4
 5.18.3
 5.18.3-RC2
 5.18.3-RC1
 5.18.2
 5.18.2-RC4
 5.18.2-RC3
 5.18.2-RC2
 5.18.2-RC1
 5.18.1
 5.18.1-RC3
 5.18.1-RC2
 5.18.1-RC1
 5.18.0
 5.18.0-RC4
 5.18.0-RC3
 5.18.0-RC2
 5.18.0-RC1
 5.17.11
 5.17.10
 5.17.9
 5.17.8
 5.17.7
 5.17.6
 5.17.5
 5.17.4
 5.17.3
 5.17.2
 5.17.1
 5.17.0
 5.16.3
 5.16.3-RC1
 5.16.2
 5.16.2-RC1
 5.16.1
 5.16.1-RC1
 5.16.0
 5.16.0-RC2
 5.16.0-RC1
 5.16.0-RC0
 5.15.9
 5.15.8
 5.15.7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.670
 5.003_13

インストールの実行

$ plenv install 5.36.0

インストール済みの Perl 一覧

$ plenv versions
* system (set by /home/sato/.anyenv/envs/plenv/version)
  5.36.0