LoginSignup
2
0

More than 5 years have passed since last update.

Perl5.24をインストールする(ソースからコンパイル) for CentOS7.2

Last updated at Posted at 2016-12-24

CentOS7.2のPerlは、v5.16.2がインストールされておりさほど新しいものではありません。昨今ではサーバー上でPerlを使うことは限定的になってきましたが、いまだに依存関係の多いアプリケーションは多く存在します。
この記事では、2017年4月現在の最新である、Perl v5.24.1をインストールする方法を記載します。

尚、OS標準のPerlと分けて管理するため、デフォルトのインストールパスである、「/usr/local」配下にインストールされます。

インストール方法

cd /usr/local/src
wget http://www.cpan.org/src/5.0/perl-5.24.1.tar.gz
tar xvzf perl-5.24.1.tar.gz
cd perl-5.24.1

#コンパイルオプションをつける
export CFLAGS='-m64 -mtune=nocona'
./configure.gnu -des -A ccflags=-fPIC

#ビルドする
make
make install

バージョン情報を確認する

/usr/local/bin/perl -v


This is perl 5, version 24, subversion 1 (v5.24.1) built for x86_64-linux

Copyright 1987-2017, 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.

5.24.1と出ていればOKです。

2
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0