私はCentOS 7を使用しており、新しいサーバをセットアップしています。問題のある場所にインストールされたCPANモジュール
私はrootとしてログインしていますが、私はCPANを通して複数のperlモジュールをインストールしました。残念ながら、彼らはrootのホームディレクトリにインストールされているようです。すべてのモジュールがインストールされていたまで、私はこれに気付かなかったが、それらのほとんどは今、このような場所を持っている:これは、root以外のユーザーのために、これらのモジュールは、基本的に権限として、存在しない、ということを意味
/root/perl5/lib/perl5/5.16.3/x86_64-linux-thread-multi
/root/perl5/lib/perl5/5.16.3
/root/perl5/lib/perl5/x86_64-linux-thread-multi
/root/perl5/lib/perl5 /usr/local/lib64/perl5
そのディレクトリからそれらをロックします。
私はすべてのユーザーに/ rootへの読み取りアクセス権を与えることでこれを解決できることを知っていますが、私はむしろそうしたくありません。
だから、私は尋ねるためにいくつかの具体的な質問がある:
- を私が間違って何をしたのですか?最初に が実行されたときにCPANでオプションをスキップしましたか? (CPAN設定は下に貼り付けられます)
- これをクリーンアップする最良の方法は何ですか?私は、モジュールをアンインストールし、私の設定を変更し、それらを再インストールする必要がありますか?経験豊富なアドバイスをいただければ幸いです。
- CentOS 7の理想的なインストールディレクトリは何ですか?どこに移動したいですか?私はCPANがそれらを理想的なデフォルトの の場所に置くと仮定しました。
すべてのアドバイスを感謝して受け取りました。
cat MyConfig.pm
$CPAN::Config = {
'applypatch' => q[],
'auto_commit' => q[1],
'build_cache' => q[100],
'build_dir' => q[/root/.cpan/build],
'build_dir_reuse' => q[0],
'build_requires_install_policy' => q[yes],
'bzip2' => q[],
'cache_metadata' => q[1],
'check_sigs' => q[0],
'colorize_output' => q[0],
'commandnumber_in_prompt' => q[1],
'connect_to_internet_ok' => q[1],
'cpan_home' => q[/root/.cpan],
'ftp_passive' => q[1],
'ftp_proxy' => q[],
'getcwd' => q[cwd],
'gpg' => q[/bin/gpg],
'gzip' => q[/bin/gzip],
'halt_on_failure' => q[0],
'histfile' => q[/root/.cpan/histfile],
'histsize' => q[100],
'http_proxy' => q[],
'inactivity_timeout' => q[0],
'index_expire' => q[1],
'inhibit_startup_message' => q[0],
'keep_source_where' => q[/root/.cpan/sources],
'load_module_verbosity' => q[none],
'make' => q[/bin/make],
'make_arg' => q[],
'make_install_arg' => q[],
'make_install_make_command' => q[/bin/make],
'makepl_arg' => q[],
'mbuild_arg' => q[],
'mbuild_install_arg' => q[],
'mbuild_install_build_command' => q[./Build],
'mbuildpl_arg' => q[],
'no_proxy' => q[],
'pager' => q[/bin/less],
'patch' => q[/bin/patch],
'perl5lib_verbosity' => q[none],
'prefer_external_tar' => q[1],
'prefer_installer' => q[MB],
'prefs_dir' => q[/root/.cpan/prefs],
'prerequisites_policy' => q[follow],
'scan_cache' => q[atstart],
'shell' => q[/bin/bash],
'show_unparsable_versions' => q[0],
'show_upload_date' => q[0],
'show_zero_versions' => q[0],
'tar' => q[/bin/tar],
'tar_verbosity' => q[none],
'term_is_latin' => q[1],
'term_ornaments' => q[1],
'test_report' => q[0],
'trust_test_report_history' => q[0],
'unzip' => q[],
'urllist' => [q[http://mirror.sov.uk.goscomb.net/CPAN/], q[http://ww
+w.mirrorservice.org/sites/cpan.perl.org/CPAN/], q[http://cpan.mirrors
+.ovh.net/ftp.cpan.org/]],
'use_sqlite' => q[0],
'version_timeout' => q[15],
'wget' => q[/bin/wget],
'yaml_load_code' => q[0],
'yaml_module' => q[YAML],
};
1;
__END__
これは、[CPANでモジュールを正常にインストールしましたが、perlが見つかりませんでした]と同じ問題だと思います。なぜですか?](http://stackoverflow.com/q/32726324/176646) – ThisSuitIsBlackNot
私はあなたの2番目と3番目の質問に答えています:[perlbrew](http://perlbrew.pl/)。 –
システムPerlを使っているなら、 'yum'を使ってモジュールをインストールしようとしましたか? –