Perl5


概要

  • フレッツADSL開通により自宅サーバ(PC9821Ne3)を公開した旨を3月25日の日記に書きましたが、FreeBSD(98)2.2.7RにインストールされていたPerlはVer4だったので、Perl5をインストールしました。


Perl5インストール

  • まず、Sources for ports/lang/perl5のページから最新版のtarballをダウンロードします。

    ・perl-5.6.1.tar.gz(5844KB)

  • 以下の手順でインストールします。

    % tar zxvf perl-5.6.1.tar.gz
    % cd perl-5.6.1
    % ./Configure
     
    Beginning of configuration questions for perl5.
     
    Checking echo to see how to suppress newlines...
    ...using -n.
    The star should be here-->*
     
    First let's make sure your kit is complete.  Checking...
    Looks good...
     
    
    This installation shell script will examine your system and ask you questions
    to determine how the perl5 package should be installed. If you get
    stuck on a question, you may use a ! shell escape to start a subshell or
    execute a command.  Many of the questions will have default answers in square
    brackets; typing carriage return will give you the default.
    
    On some of the questions which ask for file or directory names you are allowed
    to use the ~name construct to specify the login directory belonging to "name",
    even if you don't have a shell which knows about that.  Questions where this is
    allowed will be marked "(~name ok)".
    
    [Type carriage return to continue] 
    
    (その後いくつかの質問が出るが全てデフォルトで続ける。)
    
    Updating makefile...
    Now you must run 'make'.
    
    If you compile perl5 on a different machine or from a different object
    directory, copy the Policy.sh file from this object directory to the
    new one before you run Configure -- this will help you with most of
    the policy defaults.
    
    % make
    `sh  cflags libperl.a miniperlmain.o`  miniperlmain.c
              CCCMD =  cc -DPERL_CORE -c -I/usr/local/include -O 
    `sh  cflags libperl.a perl.o`  perl.c
              CCCMD =  cc -DPERL_CORE -c -I/usr/local/include -O 
    `sh  cflags libperl.a gv.o`  gv.c
    ....
    ....
    
            Making Errno (nonxs)
    Writing Makefile for Errno
    ../../miniperl -I../../lib -I../../lib -I../../lib -I../../lib Errno_pm.PL Errno.pm
    cp Errno.pm ../../lib/Errno.pm
     
            Everything is up to date. 'make test' to run test suite.
    % make test
    All tests successful.
    u=13.7109  s=6.36719  cu=1113.47  cs=181.898  scripts=254  tests=12981
    % su
    Password:
    # make install
    ...
    (途中、下記質問あり。そのままRETで継続)
    Many scripts expect perl to be installed as /usr/bin/perl.
    Do you wish to have /usr/bin/perl be the same as
    /usr/local/bin/perl? [y]  at installperl line 483.
    


PerlのVer確認

  • インストール後にPerlのVerを確認します。

    % perl -v
    
    This is perl, v5.6.1 built for i386-freebsd
    
    Copyright 1987-2001, 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.com/, the Perl Home Page.
    



トップへもどる


Copyright (c) 2002 Hiroshi Nakamura. All rights reserved.