I installed Perl under D:\Perl folder and it was working fine for a while on Windows Server.
However after Windows server restart, below error appears. - Can’t locate strict.pm in @INC (@INC entries checked: d:/Perl/site/lib)
My Perl program is described on line 1 below command.
use strict;
So this error is Perl lib not found, then I checked @INC, and it is stored only d:/Perl/site/lib
My question:
@INC Lib Path modified after Windows Server restart or Due to some influence ?
Is there any way to add d:\Perl\html\lib into @INC or original path configuration? is there no issue to modify Config.pm directly ? because strict.pm is located in d:\Perl\html\lib on Windows Server.
Error -
Can’t locate strict.pm in @INC (you may need to install the strict module) (@INC entries checked: d:/Perl/site/lib) at pams_file_transfer.pl line 1.
BEGIN failed–compilation aborted at pams_file_transfer.pl line 1.
is the location of the perlpod documentation for the ‘strict’ pragma. There should not be any actual binaries in the html tree. If there are, something is very wrong.
@INC is set at compile time. It can be modified later with the PERL5LIB variable or by using shift commands to manipulate the array after Perl has started. Neither of those methods should remove the original values that tell Perl where to find itself, and this is the real problem here. Perl cannot find itself after the server restart.
Is this a Perl built by ActiveState? How was this Perl installed on your server? If you installed using the State Tool checkout command, did you restart the virtual environment after the server restart? If you did not restart the environment, that might explain why it appears to be broken.
I use ActiveState Perl 5.40.0-Windows, and installed on my environment, AWS EC2 Windows Server 2019, then this issue appeared after restarted this server. I am not sure if the reboot is directly related to this issue, but the issue appears after restarting the server.
My next questions:
Will the library path in @INC be substituted into @INC from the config.pm settings?
If so, Where is the reference path of config.pm file itself set? is it in Windows Registry ?
Yes, it is most likely due to restarting the virtual environment, which happens when you restart the server. It’s not the registry, because the State Tool cannot alter the registry.
Servers are not covered by the free licenses. The free version is for personal and individual use, so it installs in a manner that is appropriate for a laptop, or desktop, device with one user at a time, and does not resume operations automatically after a log out or restart.