Question

Noticed our system has perl 5.8.3. I am unable to locate the DBI.pm. When i did perl -V it was showing the below output. Pasted it below. Using HPUX11 os. All installed files under the perl installation directory are having root or bin as owner of the file. I dont have root password now. I want to install DBI.pm. how can i do it. Do i need to download it from CPAN or Active Perl Website?

perl -V

Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
Locally applied patches: ActivePerl Build 809 22218 Remove the caveat about detached threads crashing on Windows 22201 Avoid threads+win32 crash by freeing Perl interpreter slightly later 22169 Display 'out of memeory' errors using low-level I/O 22159 Upgrade to Time::Hires 1.55 22120 Make 'Configure -Dcf_by=...' work 22051 Upgrade to Time::HiRes 1.54 21540 Fix backward-compatibility issues in if.pm Built under hpux Compiled at May 17 2005 18:12:56

/opt/perl/lib/5.8.3/PA-RISC1.1-thread-multi
/opt/perl/lib/5.8.3
/opt/perl/lib/site_perl/5.8.3/PA-RISC1.1-thread-multi
/opt/perl/lib/site_perl/5.8.3
/opt/perl/lib/site_perl

All installed files under the perl installation directory are having root or bin as user id. I dont have root password now. I want to install DBI. How can i do it?

Was it helpful?

Solution

CPAN has an option local::lib which will install to ~/perl5. If that works for you, that's your best option, otherwise create a directory somewhere that you do have access (probably under your /home), download DBI.pm (and any dependencies) manually, and put it in there.

Then add the directory name to your PERLLIB environment variable (which is not set at the moment). Do perl -V to confirm that ~/perl5 has been added to @INC.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top