ScottDeyo47 has asked for the wisdom of the Perl Monks concerning the following question:

I am having a problem with being able to install Perl modules on a Windows 7 server, because I need to use Gnu make. FTP is blocked so I am unable to use CPAN to perform installations. The specific problem at this time is that $to is not defined for Install.pm. Any help will be much appreciated.

  • Comment on Installing modules on Windows 7 when FTP is blocked.

Replies are listed 'Best First'.
Re: Installing modules on Windows 7 when FTP is blocked.
by Corion (Patriarch) on Feb 26, 2016 at 18:23 UTC

    Usually, you can (re)configure CPAN to use HTTP instead.

    cpan > o conf urllist

    Alternatively, you can install the cpanminus script by downloading and running it from http://cpanmin.us.

    If you don't have dmake installed on your server, that is fairly weird because Strawberry Perl comes with everything. If you're using ActiveState Perl, you can install the nmake executable. If you're using Cygwin Perl, I recommend against that, but there your system administrator should also install the make package.

      If the OP is using Strawberry Perl, it already comes with the cpanm tool from App::cpanminus.

      For the more recent versions of ActiveState's ActivePerl, you can use PPM to install MinGW and dmake from ActiveState's repository, which will let you install modules directly from CPAN. I can't say definitely when they started providing those two in their repository and there's also the catch that their repositories for older builds are now only available to those who have purchased support from them.

      The above is true for their 32-bit ActivePerl. I'm not sure if the same holds for the 64-bit ActivePerl. I want to say that there were some more steps needed and/or you need some stuff from Visual Studio to get 64-bit ActivePerl to have the compiler and tools needed to install directly modules from CPAN.

      I haven't used ActiveState's ActivePerl for at least a few years (been using Strawberry Perl instead), but thought I'd share what details I could remember in case it might help others.

Re: Installing modules on Windows 7 when FTP is blocked.
by syphilis (Archbishop) on Feb 27, 2016 at 00:01 UTC
    ... I need to use Gnu make

    You probably don't need Gnu make. Just run
    perl -V:make
    and that will output the name of the make program that you need.
    Whichever flavour of make is specified (most likely either 'nmake' or 'dmake'), you should be able to install it using HTTP - but first check to see that you don't already have it.

    Cheers,
    Rob
Re: Installing modules on Windows 7 when FTP is blocked.
by fishmonger (Chaplain) on Feb 26, 2016 at 18:19 UTC

    You don't need to use FTP. What list of urls did you select when configuring cpan?

    cpan> o conf urllist urllist 0 [http://cpan.strawberryperl.com/] 1 [http://www.cpan.org/] Type 'o conf' to view all configuration items
Re: Installing modules on Windows 7 when FTP is blocked.
by crusty_collins (Friar) on Feb 29, 2016 at 16:37 UTC
    They block everything here at work.

    it is so annoying!
    Here is what do
    Install visual studio to get nmake.exe
    Download the files and untar them into a directory : http://search.cpan.org/CPAN/authors/id/M/MS/MSCHILLI/Log-Log4perl-1.46.tar.gz
    change to the directory

    perl Makefile.PL nmake nmake test nmake install
    "We can't all be happy, we can't all be rich, we can't all be lucky – and it would be so much less fun if we were. There must be the dark background to show up the bright colours." Jean Rhys (1890-1979)