moatman has asked for the wisdom of the Perl Monks concerning the following question:
I'm very new to Perl and have inherited a system that I did not setup. Some users requested some new modules installed, as well as some updated, and that's when I ran into a brick wall. Sometimes installs or updates said they were successful and they were, sometimes they'd say they went ok but not be visible or present. It turns out that the modules are installing in various locations and I don't know how to consolidate them or get it so they update and install properly.
One example is trying to update File::Spec from 3.33 to 3.40 so I can install Path::Tiny. Install of the first goes fine, says it worked, then Path::Tiny says it is still 3.33 and I need 3.40, very annoying. After some research, I found that things were being installed in various directories. I also found something called Expat that was linked into the process as well, I don't know why. Here is my @INC after trying to fix things(I tried to use local::lib to fix things, but I think the issue is more fundamental.
%ENV: PERL5LIB="/usr/local/lib64/perl5" @INC: /usr/local/lib64/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5
For those, as an example, File::Spec is 3.4 in /usr/lib64/local/perl5 while it's 3.33 in /usr/local/lib64/perl5(and 3.30 in /usr/share/perl5). My cpan config info looks like:
$CPAN::Config options from /usr/share/perl5/CPAN/Config.pm: commit [Commit changes to disk] defaults [Reload defaults from disk] help [Short help about 'o conf' usage] init [Interactive setting of all options] applypatch [] auto_commit [0] build_cache [100] build_dir [/root/.cpan/build] build_dir_reuse [0] build_requires_install_policy [ask/yes] bzip2 [/usr/bin/bzip2] cache_metadata [1] check_sigs [0] colorize_debug undef colorize_output undef colorize_print undef colorize_warn undef commandnumber_in_prompt [1] commands_quote undef connect_to_internet_ok [1] cpan_home [/root/.cpan] curl [/usr/bin/curl] dontload_hash undef dontload_list undef ftp [] ftp_passive [1] ftp_proxy [] ftpstats_period undef ftpstats_size undef getcwd [cwd] gpg [/usr/bin/gpg] gzip [/bin/gzip] halt_on_failure [0] histfile [/root/.cpan/histfile] histsize [100] http_proxy [] inactivity_timeout [0] index_expire [1] inhibit_startup_message [0] keep_source_where [/root/.cpan/sources] load_module_verbosity [v] lynx [] make [/usr/bin/make] make_arg [] make_install_arg [] make_install_make_command [/usr/bin/make] makepl_arg [EXPATLIBPATH=//data/shared/expat-2.1.0/lib EXP +ATINCPATH=//data/shared/expat-2.1.0/include] mbuild_arg [] mbuild_install_arg [] mbuild_install_build_command [./Build] mbuildpl_arg [--installdirs site] ncftp [] ncftpget [] no_proxy [] pager [/usr/bin/less] password undef patch [/usr/bin/patch] patches_dir undef perl5lib_verbosity [v] prefer_external_tar undef prefer_installer [MB] prefs_dir [/root/.cpan/prefs] prerequisites_policy [ask] proxy_pass undef proxy_user undef randomize_urllist undef scan_cache [atstart] shell [/bin/bash] show_unparsable_versions [0] show_upload_date [0] show_zero_versions [0] tar [/bin/tar] tar_verbosity [v] term_is_latin [1] term_ornaments [1] test_report [0] trust_test_report_history [0] unzip [/usr/bin/unzip] urllist use_sqlite [0] username undef version_timeout undef wait_list undef wget [/usr/bin/wget] yaml_load_code [0] yaml_module [YAML]
My Perl Config.pm(in /usr/lib64/perl5) includes the following at the end:
archlibexp => '/usr/lib64/perl5', archname => 'x86_64-linux-thread-multi', cc => 'gcc', d_readlink => 'define', d_symlink => 'define', dlsrc => 'dl_dlopen.xs', dont_use_nlink => undef, exe_ext => '', inc_version_list => '5.10.0', intsize => '4', ldlibpthname => 'LD_LIBRARY_PATH', libpth => '/usr/local/lib64 /lib64 /usr/lib64', osname => 'linux', osvers => '2.6.32-220.el6.x86_64', path_sep => ':', privlibexp => '/usr/share/perl5', scriptdir => '/usr/bin', sitearchexp => '/usr/local/lib64/perl5', sitelibexp => '/usr/local/share/perl5', useithreads => 'define', usevendorprefix => 'define', version => '5.10.1',
I don't know what to do at this point, I've tried various versions of editing cpan, local::lib, and the perl config file to no luck. I also don't know how Expat fits into things. Some of the times I've tried changing cpan settings, it starts using the archname and sitelib folders instead of where I tell it. I don't care which directory is used, I just want a single and cohesive set of modules that won't keep splitting up as they have. Any help would be appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Modules being installed in different directories, causing problems.
by Tanktalus (Canon) on Dec 24, 2013 at 16:53 UTC | |
by moatman (Initiate) on Jan 08, 2014 at 20:47 UTC | |
|
Re: Modules being installed in different directories, causing problems.
by karlgoethebier (Abbot) on Dec 24, 2013 at 20:21 UTC | |
|
Re: Modules being installed in different directories, causing problems.
by Anonymous Monk on Dec 26, 2013 at 15:43 UTC |