Operating System - HP-UX
1827458 Members
5588 Online
109965 Solutions
New Discussion

Re: Perl compilation problem

 
Youlette Etienne_2
Regular Advisor

Perl compilation problem

Hello Everyone,

I have just installed perl5.6.1 on an hpux 11.0 server. I previously had perl 5.0 installed. When I run one of my previos perl programs, which contains the "use Cwd" line, I get the following error:

Can't locate Cwd.pm in @INC (@INC contains: /opt/perl5/lib/5.6.1/PA-RISC1.1 /opt/perl5/lib/5.6.1 /opt/perl5/lib/site_perl/5.6.1/PA-RISC1.1 /opt/perl5/lib/site_perl/5.6.1 /opt/perl5/lib/site_perl .) at ./system.perl line 7.
BEGIN failed--compilation aborted at ./system.perl line 7.

Program worked fine with the previous version.
Any help in solving this problem is greatly appreciated.

Thanks in advance.

Youlette
If at first you don't succeed, change the rules!
2 REPLIES 2
linuxfan
Honored Contributor

Re: Perl compilation problem

Hi Youlette,

Looks like you need the Cwd.pm
You can download the module from http://search.cpan.org/search?disk=Cwd

or

http://www.cpan.org/authords/id/L/LI/LIBERTY/Cwd-2.06.tar.gz

Once you download the file gunzip and untar it. Then run
perl Makefile.PL
make
make test
make install

This would install the module on your system.

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Ralph Grothe
Honored Contributor

Re: Perl compilation problem

Hi Youlette,

though Ramesh's recipe is generally correct something seems to have gone wrong with your installation, because to my knowledge the Cwd module is part of Perl's core distribution.

What happens if you say (as non-root user) "perldoc Cwd"?
Do you get the POD.
If not you should look in Perl's installation path, usually something like
# find /opt/perl5/lib -name Cwd.pm
/opt/perl5/lib/5.6.1/Cwd.pm

Check if your @INC array includes this search path,

# perl -e 'print "@INC\n"'
/opt/perl5/lib/5.6.1/PA-RISC2.0 /opt/perl5/lib/5.6.1 /opt/perl5/lib/site_perl/5.
6.1/PA-RISC2.0 /opt/perl5/lib/site_perl/5.6.1 /opt/perl5/lib/site_perl .

If however find couldn't spot it follow Ramesh's instruction, and install the missing module.
Chances are however that other core modules might be missing in your installation.
Madness, thy name is system administration