=encoding utf8 =head1 NAME =begin original perlmodinstall - Installing CPAN Modules =end original perlmodinstall - CPAN モジュールのインストール =head1 DESCRIPTION =begin original You can think of a module as the fundamental unit of reusable Perl code; see L for details. Whenever anyone creates a chunk of Perl code that they think will be useful to the world, they register as a Perl developer at L so that they can then upload their code to the CPAN. The CPAN is the Comprehensive Perl Archive Network and can be accessed at L , and searched at L . =end original モジュールは、再利用可能な Perl コードの基本単位と考えることができます; 詳しくは、L を参照してください。 誰かが世界に役立つと思う Perl コードの塊を作成したら、 L に Perl 開発者として登録し、 CPAN にコードをアップロードできるようにします。 CPAN は Comprehensive Perl Archive Network で、 L でアクセスでき、L で 検索できます。 =begin original This documentation is for people who want to download CPAN modules and install them on their own computer. =end original この文書は、CPAN モジュールをダウンロードして自分のコンピュータに インストールしたい人のためのものです。 =head2 PREAMBLE =begin original First, are you sure that the module isn't already on your system? Try C. (Replace "Foo" with the name of the module; for instance, C.) =end original まず、モジュールがまだシステムにインストールされていないことを 確認しましたか? C を試してみてください。 ("Foo" をモジュールの名前に置き換え、 例えば C のようにします。) =begin original If you don't see an error message, you have the module. (If you do see an error message, it's still possible you have the module, but that it's not in your path, which you can display with C.) For the remainder of this document, we'll assume that you really honestly truly lack an installed module, but have found it on the CPAN. =end original エラーメッセージが表示されない場合は、モジュールがあります (エラーメッセージが表示された場合は、モジュールはまだありますが、 そのモジュールがパスにない可能性があります。 パスは C で表示できます)。 この文書の残りの部分では、そのモジュールは実際に本当に絶対に インストールされておらず、 しかし CPAN 上にはモジュールがあると仮定します。 =begin original So now you have a file ending in .tar.gz (or, less often, .zip). You know there's a tasty module inside. There are four steps you must now take: =end original それで、今あなたは .tar.gz (または、それほど頻繁ではありませんが .zip)で 終わるファイルを持っています。 中においしいモジュールがあることは知っています。 次の四つのステップを踏む必要があります: =over 5 =item B the file (ファイルを B<伸張> する) =item B the file into a directory (ファイルをディレクトリに B<展開> する) =item B the module (sometimes unnecessary) (モジュールを B<ビルド> する (不要の場合もあります)) =item B the module. (モジュールを B<インストール> する) =back =begin original Here's how to perform each step for each operating system. This is a substitute for reading the README and INSTALL files that might have come with your module! =end original ここでは、各オペレーティングシステムに対して各ステップを実行する方法を 説明します。 これは、モジュールに付属している README ファイルと INSTALL ファイルを 読む代わりでは <ありません>! =begin original Also note that these instructions are tailored for installing the module into your system's repository of Perl modules, but you can install modules into any directory you wish. For instance, where I say C, you can substitute C to install the modules into F. Then you can use the modules from your Perl programs with C or sometimes just C. If you're on a system that requires superuser/root access to install modules into the directories you see when you type C, you'll want to install them into a local directory (such as your home directory) and use this approach. =end original また、これらの指示は、システムの Perl モジュールのリポジトリにモジュールを インストールするように調整されていることにも注意してください; ただし、モジュールは任意のディレクトリにインストールできます。 例えば、C の場合、 C にインストールするために C と 置き換えることができます。 次に、Perl プログラムのモジュールを C で使用することもできますし、 場合によっては単に C で使用することもできます。 C と入力したときに表示されるディレクトリに モジュールをインストールするためにスーパーユーザー /root アクセスを 必要とするシステムを使用している場合は、ローカルディレクトリ (ホームディレクトリなど)にモジュールをインストールし、 この方法を使用します。 =over 4 =item * =begin original B =end original B =begin original You can use Andreas Koenig's CPAN module ( L ) to automate the following steps, from DECOMPRESS through INSTALL. =end original Andreas Koenig の CPAN モジュール (L) を使えば、 DECOMPRESS から INSTALL までのステップを自動化することができます。 =begin original A. DECOMPRESS =end original A. 伸張 =begin original Decompress the file with C =end original C でファイルを伸張します。 =begin original You can get gzip from L =end original L から gzip を入手できます。 =begin original Or, you can combine this step with the next to save disk space: =end original または、この手順と次の手順を組み合わせてディスク領域を節約することもできます: gzip -dc yourmodule.tar.gz | tar -xof - =begin original B. UNPACK =end original B. 展開 =begin original Unpack the result with C =end original 結果 をC で展開します。 =begin original C. BUILD =end original C. ビルド =begin original Go into the newly-created directory and type: =end original 新しく作成されたディレクトリに移動し、次のように入力します: perl Makefile.PL make test =begin original or =end original または perl Makefile.PL PREFIX=/my/perl_directory =begin original to install it locally. (Remember that if you do this, you'll have to put C near the top of the program that is to use this module. =end original とするとローカルにインストールします。 (これを行う場合は、このモジュールを使うプログラムの先頭近くに C を置かなければならないことを 覚えておいてください。) =begin original D. INSTALL =end original D. インストール =begin original While still in that directory, type: =end original そのディレクトリにある状態で、次のように入力します: make install =begin original Make sure you have the appropriate permissions to install the module in your Perl 5 library directory. Often, you'll need to be root. =end original モジュールを Perl 5 ライブラリーディレクトリにインストールするための 適切な許可を持っていることを確認してください。 多くの場合、root になる必要があります。 =begin original That's all you need to do on Unix systems with dynamic linking. Most Unix systems have dynamic linking. If yours doesn't, or if for another reason you have a statically-linked perl, B the module requires compilation, you'll need to build a new Perl binary that includes the module. Again, you'll probably need to be root. =end original 動的リンク機能を備えた Unix システムで行う必要があるのはこれだけです。 ほとんどの Unix システムには動的リンク機能があります。 動的リンク機能がない場合や、別の理由で静的にリンクされた perl を 持っていて、B<かつ> モジュールをコンパイルする必要がある場合は、 このモジュールを含む新しい Perl バイナリを作成する必要があります。 ここでもおそらく root になる必要があります。 =item * =begin original B =end original B =begin original First, type C from a shell and see whether ActiveState's PPM repository has your module. If so, you can install it with C and you won't have to bother with any of the other steps here. You might be able to use the CPAN instructions from the "Unix or Linux" section above as well; give it a try. Otherwise, you'll have to follow the steps below. =end original まず、シェルから C と入力して、ActiveState の PPM リポジトリに あなたのモジュールがあるかどうかを確認します。 もしあるなら、C と一緒にインストールすることができますし、 ここで他の手順に煩わされることもありません。 上の「Unix または Linux」セクションにある CPAN の指示も 使えるかもしれません; 試してみてください。 そうでなければ、以下の手順に従わなければなりません。 A. DECOMPRESS =begin original You can use the open source 7-zip ( L ) or the shareware Winzip ( L ) to decompress and unpack modules. =end original オープンソースの 7-zip (L) か シェアウェアの Winzip (L) を使用して、 モジュールを伸張および展開できます。 B. UNPACK =begin original If you used WinZip, this was already done for you. =end original WinZip を使用している場合は、これは既に行われています。 C. BUILD =begin original You'll need either C or C. =end original C か C のどちらかが必要です。 =begin original Does the module require compilation (i.e. does it have files that end in .xs, .c, .h, .y, .cc, .cxx, or .C)? If it does, life is now officially tough for you, because you have to compile the module yourself (no easy feat on Windows). You'll need a compiler such as Visual C++. Alternatively, you can download a pre-built PPM package from ActiveState. L =end original モジュールをコンパイルする必要がありますか (.xs, .c, .h, .y, .cc, .cxx, .C で終わるファイルがありますか)? もしそうなら、人生は公式に厳しいものです; なぜなら、自分でモジュールをコンパイルしなければなりません (Windows では簡単にはできません)。 Visual C++ などのコンパイラが必要になります。 あるいは、ActiveState からビルド済みの PPM パッケージを ダウンロードすることもできます。 L =begin original Go into the newly-created directory and type: =end original 新しく作成されたディレクトリに移動し、次のように入力します: perl Makefile.PL nmake test D. INSTALL =begin original While still in that directory, type: =end original そのディレクトリにいる状態で、次のように入力します。 nmake install =item * =begin original B =end original B A. DECOMPRESS =begin original djtarx ( L ) will both uncompress and unpack. =end original djtarx ( L ) は 伸張と展開の両方を行います。 B. UNPACK =begin original See above. =end original 上記を参照してください。 C. BUILD =begin original Go into the newly-created directory and type: =end original 新しく作成されたディレクトリに移動し、次のように入力します: perl Makefile.PL make test =begin original You will need the packages mentioned in F in the Perl distribution. =end original Perl ディストリビューションの F に記載されているパッケージが 必要です。 D. INSTALL =begin original While still in that directory, type: =end original そのディレクトリにいる状態で、次のように入力します: make install =begin original You will need the packages mentioned in F in the Perl distribution. =end original Perl ディストリビューションの F に記載されているパッケージが 必要です。 =item * =begin original B =end original B =begin original Get the EMX development suite and gzip/tar from Hobbes ( L ), and then follow the instructions for Unix. =end original Hobbes (L) から EMX 開発スイートと gzip/tar を入手し、Unix 用の指示に従ってください。 =item * =begin original B =end original B =begin original When downloading from CPAN, save your file with a C<.tgz> extension instead of C<.tar.gz>. All other periods in the filename should be replaced with underscores. For example, C should be downloaded as C. =end original CPAN からダウンロードする場合は、ファイルを C<.tar.gz> ではなく C<.tgz> 拡張子で保存します。 ファイル名の他のすべてのピリオドはアンダースコアに置き換える必要があります。 たとえば、C は C として ダウンロードする必要があります。 =begin original A. DECOMPRESS =end original A. 伸張 =begin original Type =end original 次のように入力します: gzip -d Your-Module.tgz =begin original or, for zipped modules, type =end original または、zip モジュールの場合は、次のように入力します: unzip Your-Module.zip =begin original Executables for gzip, zip, and VMStar: =end original gzip, zip, VMStar 用の実行可能ファイル: http://www.hp.com/go/openvms/freeware/ =begin original and their source code: =end original ソースコード: http://www.fsf.org/order/ftp.html =begin original Note that GNU's gzip/gunzip is not the same as Info-ZIP's zip/unzip package. The former is a simple compression tool; the latter permits creation of multi-file archives. =end original GNU の gzip/gunzip は Info-ZIP の zip/unzip パッケージと 同じではないことに注意してください。 前者は単純な圧縮ツールです; 後者は複数ファイルの アーカイブの作成を可能にします。 =begin original B. UNPACK =end original B. 展開 =begin original If you're using VMStar: =end original VMStar を使用する場合: VMStar xf Your-Module.tar =begin original Or, if you're fond of VMS command syntax: =end original あるいは、VMS コマンドの文法が好きなら: tar/extract/verbose Your_Module.tar =begin original C. BUILD =end original C. ビルド =begin original Make sure you have MMS (from Digital) or the freeware MMK ( available from MadGoat at L ). Then type this to create the DESCRIP.MMS for the module: =end original MMS(Digital から)かフリーウェアの MMK(MadGoat L から 入手可能)があることを確認してください。 次に次のように入力してモジュール用の DESIPP.MMS を作成します: perl Makefile.PL =begin original Now you're ready to build: =end original これでビルドの準備ができました: mms test =begin original Substitute C for C above if you're using MMK. =end original MMK を使っている場合は、上記の C を C に置き換えてください。 =begin original D. INSTALL =end original D. インストール =begin original Type =end original 次のように入力します: mms install =begin original Substitute C for C above if you're using MMK. =end original MMK を使っている場合は、上記の C を C に置き換えてください。 =item * =begin original B, =end original B =begin original Introduce the F<.tar.gz> file into an HFS as binary; don't translate from ASCII to EBCDIC. =end original F<.tar.gz> ファイルをバイナリとして HFS に導入します。 ASCII から EBCDIC に変換しないでください。 =begin original A. DECOMPRESS =end original A. 伸張 =begin original Decompress the file with C =end original C でファイルを伸張します。 =begin original You can get gzip from L =end original gzip は L から入手できます。 =begin original B. UNPACK =end original B. 展開 =begin original Unpack the result with =end original 結果を次のように展開します。 pax -o to=IBM-1047,from=ISO8859-1 -r < yourmodule.tar =begin original The BUILD and INSTALL steps are identical to those for Unix. Some modules generate Makefiles that work better with GNU make, which is available from L =end original BUILD と INSTALL の手順は Unix の場合と同じです。 いくつかのモジュールは GNU make でより良く動作する Makefile を生成します; これは L から入手できます。 =back =head1 PORTABILITY (移植性) =begin original Note that not all modules will work with on all platforms. See L for more information on portability issues. Read the documentation to see if the module will work on your system. There are basically three categories of modules that will not work "out of the box" with all platforms (with some possibility of overlap): =end original すべてのモジュールがすべてのプラットフォームで 動作するわけではないことに注意してください。 移植性の問題についての詳細は L を参照してください。 モジュールがお使いのシステムで動作するかどうかは、 文書を読んで確認してください。 すべてのプラットフォームで「そのままで」動作しないモジュールには、 基本的に三つのカテゴリがあります(重複する可能性もあります): =over 4 =item * =begin original B These need to be fixed; consider contacting the author and possibly writing a patch. =end original B<動作するはずなのに動作しない。> これらは修正する必要があります; 作者に連絡してパッチを書くことを検討してください。 =item * =begin original B (These modules contain F<.xs> or F<.c> files, usually.) You might be able to find existing binaries on the CPAN or elsewhere, or you might want to try getting compilers and building it yourself, and then release the binary for other poor souls to use. =end original B<コンパイルする必要があるけれども、ターゲットプラットフォームに はすぐに入手できるコンパイラがない。> (これらのモジュールには、通常 F<.xs> または F<.c> ファイルが含まれています。) CPAN やその他の場所で既存のバイナリを見つけることができるかもしれませんし、 あるいはコンパイラを入手して自分でビルドしてみて、他の不運な人々が 使えるようにバイナリをリリースすることもできます。 =item * =begin original B (Such as the Win32:: modules.) If the module is targeted specifically at a platform other than yours, you're out of luck, most likely. =end original B<特定のプラットフォームをターゲットにしたモジュール。> (Win32:: モジュールなど。) モジュールがあなたのものでないプラットフォームをターゲットにしている場合は、 おそらく運がありません。 =back =begin original Check the CPAN Testers if a module should work with your platform but it doesn't behave as you'd expect, or you aren't sure whether or not a module will work under your platform. If the module you want isn't listed there, you can test it yourself and let CPAN Testers know, you can join CPAN Testers, or you can request it be tested. =end original モジュールがあなたのプラットフォームで 動作するはずなのに期待通りに動作しないか、またはモジュールが あなたのプラットフォームで動作するかどうか分からない場合は、 CPAN Testers をチェックしてください。 必要なモジュールがリストにない場合は、自分でテストして CPAN Testers に知らせたり、CPAN Testers に参加したり、テストを リクエストしたりできます。 https://cpantesters.org/ =head1 HEY =begin original If you have any suggested changes for this page, let me know. Please don't send me mail asking for help on how to install your modules. There are too many modules, and too few Orwants, for me to be able to answer or even acknowledge all your questions. Contact the module author instead, ask someone familiar with Perl on your operating system, or if all else fails, file a ticket at L. =end original このページで提案された変更点がありましたら、お知らせください。 モジュールのインストール方法に関するヘルプを求めるメールを私に 送らないでください。 モジュールは多すぎ、Orwants は少なすぎます; 私はあなたの質問に答えることも、すべての質問に答えることもできません。 モジュールの作成者に問い合わせるか、 オペレーティングシステムの Perl に精通した人に尋ねて、 どれもうまく行かなかった場合は、L にチケットを 登録してください。 =head1 AUTHOR Jon Orwant orwant@medita.mit.edu =begin original with invaluable help from Chris Nandor, and valuable help from Brandon Allbery, Charles Bailey, Graham Barr, Dominic Dunlop, Jarkko Hietaniemi, Ben Holzman, Tom Horsley, Nick Ing-Simmons, Tuomas J. Lukka, Laszlo Molnar, Alan Olsen, Peter Prymmer, Gurusamy Sarathy, Christoph Spalinger, Dan Sugalski, Larry Virden, and Ilya Zakharevich. =end original Chris Nandor からの貴重な支援、そして Brandon Allbery, Charles Bailey, Graham Barr, Dominic Dunlop, Jarkko Hietaniemi, Ben Holzman, Tom Horsley, Nick Ing-Simmons, Tuomas J. Lukka, Laszlo Molnar, Alan Olsen, Peter Prymmer, Gurusamy Sarathy, Christoph Spalinger, Dan Sugalski, Larry Virden, Ilya Zakharevich からの 価値ある助けと共に。 First version July 22, 1998; last revised November 21, 2001. =head1 COPYRIGHT Copyright (C) 1998, 2002, 2003 Jon Orwant. All Rights Reserved. This document may be distributed under the same terms as Perl itself. =begin meta Translate: SHIRAKATA Kentaro Status: completed =end meta