Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: Can't locate strict.pm in @INC (@INC contains: .)

by rjt (Curate)
on Oct 31, 2019 at 10:56 UTC ( #11108163=note: print w/replies, xml ) Need Help??


in reply to Re^2: Can't locate strict.pm in @INC (@INC contains: .)
in thread Can't locate strict.pm in @INC (@INC contains: .)

Sorry for the confusion on "envdump". That just means "environment dump," but more generally, simply having a look at the environment variables on your system, which I explained how to do in this other reply in this question thread.

However, the results of your print @INC seem fine, so once you get your paths sorted out so C:\Strawberry\perl\bin comes before ActiveState's directory in your PATH, you'll be running Strawberry Perl whenever you simply run perl, without the need for the fully qualified path.

Replies are listed 'Best First'.
Re^4: Can't locate strict.pm in @INC (@INC contains: .)
by Weiling (Novice) on Oct 31, 2019 at 13:20 UTC
    Alleluia! I finally uninstall Strawberry 5.30 and reinstall ActivePerl 5.28, and it works! Have to find how to update the perllib and it will be OK! Bug thanks to all of you for the help! i'm really gratefull!

    EDIT: Ouch... not so perfect.. I just try to install a module on cpan (without internet), and i have a error message...

    PS E:\data\Perl\script\modulecpan\DBD-mysql-4.050> perl .\Makefile Backslash found where operator expected at .\Makefile line 39, near "W +INDOWS\" Backslash found where operator expected at .\Makefile line 39, near "s +ystem32\" Semicolon seems to be missing at .\Makefile line 51. Warning: Use of "-s" without parentheses is ambiguous at .\Makefile li +ne 52. String found where operator expected at .\Makefile line 52, near "L"E: +\Outils_Exploit\Strawberry\perl\lib\CORE"" String found where operator expected at .\Makefile line 52, near "L"E: +\Outils_Exploit\Strawberry\c\lib"" Warning: Use of "-s" without parentheses is ambiguous at .\Makefile li +ne 53. String found where operator expected at .\Makefile line 53, near "L"E: +\Outils_Exploit\Strawberry\perl\lib\CORE"" String found where operator expected at .\Makefile line 53, near "L"E: +\Outils_Exploit\Strawberry\c\lib"" Semicolon seems to be missing at .\Makefile line 58. Backslash found where operator expected at .\Makefile line 60, near "O +utils_Exploit\" Backslash found where operator expected at .\Makefile line 60, near "S +trawberry\" Backslash found where operator expected at .\Makefile line 60, near "p +erl\" Backslash found where operator expected at .\Makefile line 60, near "s +ite\" Backslash found where operator expected at .\Makefile line 61, near "O +utils_Exploit\" Backslash found where operator expected at .\Makefile line 61, near "S +trawberry\" Backslash found where operator expected at .\Makefile line 61, near "p +erl\" Backslash found where operator expected at .\Makefile line 61, near "s +ite\" Backslash found where operator expected at .\Makefile line 63, near "O +utils_Exploit\" Backslash found where operator expected at .\Makefile line 63, near "S +trawberry\" Backslash found where operator expected at .\Makefile line 63, near "p +erl\" Backslash found where operator expected at .\Makefile line 63, near "v +endor\" Backslash found where operator expected at .\Makefile line 64, near "O +utils_Exploit\" Backslash found where operator expected at .\Makefile line 64, near "S +trawberry\" Backslash found where operator expected at .\Makefile line 64, near "p +erl\" Backslash found where operator expected at .\Makefile line 64, near "v +endor\" Can't modify constant item in scalar assignment at .\Makefile line 39, + near "C:" syntax error at .\Makefile line 39, near "C:" Unknown regexp modifier "/O" at .\Makefile line 69, at end of line Unknown regexp modifier "/t" at .\Makefile line 69, at end of line Regexp modifiers "/u" and "/l" are mutually exclusive at .\Makefile li +ne 69, at end of line Unknown regexp modifier "/_" at .\Makefile line 69, at end of line Unknown regexp modifier "/E" at .\Makefile line 69, at end of line Regexp modifiers "/u" and "/l" are mutually exclusive at .\Makefile li +ne 69, at end of line Unknown regexp modifier "/t" at .\Makefile line 69, at end of line Unknown regexp modifier "/e" at .\Makefile line 69, at end of line .\Makefile has too many errors.
    Seem's he look on a previons path where it was installed

      That error shows there's still a copy of Strawberry Perl somewhere. Specifically, in E:\Outils_Exploit\Strawberry. That appears to be in your path before the active state perl you're trying to run. As davido said directly, and others have strongly hinted, whichever perl is first in your path is the one that will run.

      A good way to find out when you have multiple executable programs of the same name in your Windows path is to use the builtin where. With my path as currently set, I only have one perl.exe visible, but there are two copies of find.

      C:\usr\local\share\PassThru\perl>where perl c:\usr\local\apps\berrybrew\perls\system\perl\bin\perl.exe C:\usr\local\share\PassThru\perl>where find C:\Windows\System32\find.exe c:\usr\local\bin\find.exe
      As such, when I run perl, it will run that one copy. But if I run find, the copy in c:\windows\system32 will take priority. If you run something similar for where perl, or where cpan, or where cpanm, or where ppm, you might see more than one instance of one or more of those. You then need to make sure that the correct perl is coming first in the path, as well as the correct helper utilities (like whatever you use for downloading and installing modules)

      Further, Makefile is not a perl script, so perl Makefile is trying to run a set of rules that "make" (or similar) would want with the perl interpreter, which isn't going to work right. The normal idiom is

      perl Makefile.PL make make test make install
      , where Makefile.PL is a perl script that creates the Makefile for make to run, and make might be dmake or gmake instead, depending on your perl version and whether it's ActiveState or Strawberry or something else. Once you've got the right perl in your path, run perl -V:make to find out which make utility you should use.

Re^4: Can't locate strict.pm in @INC (@INC contains: .) THANKS
by Weiling (Novice) on Nov 06, 2019 at 16:04 UTC
    Hi everyone, Just FYI, i finally made it... I just wipe all version's of Perl i had on the server, then reinstall a proper and more recent version of ActivePerl, with an other version of Strawberry Perl. Then i check my windows path to be sur eveything is ok. Now both perl work well! Big thanks to all of you! And for you'r patience .. :D
Re^4: Can't locate strict.pm in @INC (@INC contains: .)
by Weiling (Novice) on Oct 31, 2019 at 12:28 UTC
    Ok, after modify the patch and a reboot, situation evolving.. a little. When i try to launch a perl script, i have this error message, who's not the same as earlier:
    PS E:\data\Perl\script> perl -V nul: Perl lib version (5.28.1) doesn't match executable 'C:\Strawberry +\perl\bin\perl.exe' version (5.30.0) at C:/Strawbe rry/perl/lib/Config.pm line 62. Compilation failed in require. BEGIN failed--compilation aborted.

      This means that you or somebody else copied perl.exe 5.30.0 into C:\Strawberry\perl\bin\ and perl.dll from a 5.28.1 directory.

      The Perl version(s) below C:\Strawberry are most likely mixed between versions now. If you have other Perl versions installed in other directories, consider renaming them away and retrying, to see whether Windows picks up a perl.dll from a different Perl version than you want.

      Mixing files between Perl versions is unsupported and will lead only to problems.

Re^4: Can't locate strict.pm in @INC (@INC contains: .)
by Weiling (Novice) on Oct 31, 2019 at 11:45 UTC
    Here's with the line i have in "PATH" as system variables:
    D:\Puppet Labs\Puppet\puppet\bin;D:\Puppet Labs\Puppet\facter\bin;D:\P +uppet Labs\Puppet\hiera\bin;D:\Puppet Labs\Puppet\bin;D:\Puppet Labs\ +Puppet\sys\ruby\bin;D:\Puppet Labs\Puppet\sys\tools\bin;C:\WINDOWS\sy +stem32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Window +sPowerShell\v1.0\;C:\SCRIPTS\DIG\;D:\Puppet Labs\Puppet\bin;C:\Progra +m Files\7-Zip;C:\Program Files (x86)\Gpg4win\..\GnuPG\bin;C:\Windows\ +System32;C:\Program Files\PuTTY\;E:\Outils_Exploit\Wamp64\bin\php\php +7.3.5;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\p +erl\bin
    As you can see, there is no trace of "ActiveState". I don't understand, should i change the Strawberry line in first place?
      If you want strawberry first put it first in %path%

      As you can see, there is no trace of "ActiveState".

      WAKE UP!

      directory names can be anything

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11108163]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2020-03-29 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    To "Disagree to disagree" means to:









    Results (171 votes). Check out past polls.

    Notices?