問題: サーバー上で tar、gzip、および bzip2 が適切に動作しています。ただし、「CPAN.pm には外部プログラム tar、gzip、bzip2 のいずれかがインストールされている必要があります。続行できません。 cpan を使用して perl モジュールをインストールする際のエラー メッセージ。この記事では、この問題を解決する方法について説明します。
また、手動および cpan メソッドを使用して Perl モジュールをインストールする方法に関する以前の記事も参照してください。
解決策:
このエラーは、CPAN が tar、bzip2、および gzip ファイルの場所を認識していないために発生します。以下に示すように、これらの場所を構成します。
# perl -MCPAN -eshell cpan shell -- CPAN exploration and modules installation (v1.9205) ReadLine support available (maybe install Bundle::CPAN or Bundle::CPANxxl?) cpan[1]> o conf tar /bin/tar tar [/bin/tar] Please use 'o conf commit' to make the config permanent! cpan[2]> o conf bzip2 /bin/bzip2 bzip2 [/bin/bzip2] Please use 'o conf commit' to make the config permanent! cpan[3]> o conf gzip /bin/gzip gzip [/bin/gzip] Please use 'o conf commit' to make the config permanent! cpan[4]> o conf commit commit: wrote '/usr/lib/perl5/5.10.0/CPAN/Config.pm' cpan[5]> quit No history written (no histfile specified). Lockfile removed.
上記のように、コミットを実行して構成の変更を保存してください。