0

I'm currently trying to port a copy of a script I wrote in perl that uses the Statistics::R module to communicate with R from a linux -based OS to a Windows 7 OS. I have been successful at installing R and Strawberry Perl onto the system, but have hit a stumbling block when installing the Statistics::R module. One of the modules it relies upon (Regexp::Common) requires the installation of a newer version of perl than appears to be on my system- at least 5.01 as opposed to the 5.008008 that it identifies. I believe I have the latest Strawberry Perl version installed (5.24), and this works well on the system with other scripts used. I was wondering if anyone knows of a way to install a newer version of perl onto the system, or if there is an alternate way to fix this issue? Thanks.

  • Windows does not come with Perl. If it runs a Perl 5.8.8 then you have that installed somewhere. How do you run that script that complains about the missing dependency? What command do you use? It could be that this is an issue of what program gets to run it. – simbabque Sep 26 '16 at 11:09
  • I have recently installed Strawberry Perl 5.24 onto the system, but believe that prior to this no version was installed. The command I would use is "Perl script_name input_filename" but I have not got this far yet- I know that I require the Statistics::R module for the script to work, which in turn requires the Regexp::Common module that has failed dependencies on installation. – R_Cunnison Sep 26 '16 at 11:25
  • How do you install the dependencies? – simbabque Sep 26 '16 at 11:26
  • I'm currently using cpan/cpanm commands to install – R_Cunnison Sep 26 '16 at 11:28
  • You need to figure out where your cpan or cpanm is located and what its working directory is. http://stackoverflow.com/a/304447/1331451 might work for that, but I am not sure. I don't have a Windows to try, sorry. – simbabque Sep 26 '16 at 11:31
  • *“as opposed to the 5.008008 that it identifies”* are you saying that `Regexp::Common` is telling you that you are running Perl v5.8.8? What do you do to get that information? – Borodin Sep 26 '16 at 12:02
  • Yes. I tried to install it via the command "cpanm Regexp::Common" which failed due to the version not being at least v5.01. – R_Cunnison Sep 26 '16 at 12:11
  • 1
    @simbabque Thanks for the help. Found an older version of perl on the system that cpan was running from. Removed and installed a newer version and the issue has gone. – R_Cunnison Sep 26 '16 at 13:38
  • If you can, you should self-answer your question including the steps you did to find and remove that old Perl. That's helpful for others. – simbabque Sep 26 '16 at 13:40

1 Answers1

0

Use the "where" command to locate the cpan modules that are associated with the installation of new modules. Associated Perl versions can then be removed via the Programs and Features window found in the Start Menu by clicking on the "Uninstall" button. Re-installation of the latest perl version from either Strawberry Perl or other Windows- compatible Perl releases will allow for a newer Perl version to be accessed.