0
votes

I am getting the following error, while run the perl script.

Can't locate File/stat.pm in @INC (you may need to install the File::stat module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/local/share/perl/5.24.1/Path/Class/Entity.pm line 9.

I have tried to install the missing package thorugh CPAN install. When i tried CPAN ,I am getting the following error

Can't locate File/Find.pm in @INC (you may need to install the File::Find module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl/5.24/CPAN/CacheMgr.pm line 8.

Can u please any one help me to resolve the issue.

1
What OS are you using? - Shawn
Debian (Stretch) 9.9 - Esakki Thangam
Required packages are already installed and located in the below path /usr/share/perl5 . @INC array also have this path. But, still i'm getting this error. I don't know what is missing?. - Esakki Thangam
What is the absolute path for "stat.pm" file? Should be something like this: /usr/share/perl/5.24/File/stat.pm - Roberto Paz
Find.pm has located into the path /usr/share/perl/5.24.1/File/Find.pm , Stat.pm has located into the below path /apps/sl-gehirn/gehirn/local/lib/perl5/Path/Class/File/Stat. pm - Esakki Thangam

1 Answers

2
votes

File::stat has been a part of the standard Perl distribution since Perl 5.004 in 1997. There should never be a reason to install it separately. If you find yourself in that situation, then something has gone badly wrong in your Perl installation and I would strongly suggest reinstalling from scratch using the pre-built packages supplied by your Linux distribution.