Strawberry perl CPAN dmake will not build

I had a problem installing CPAN modules using strawberry perl 5.16.2.2 64-bit and later. When installing from CPAN, dmake cannot create a module with the following error:

dmake.exe: Error executing 'C:\Windows\system32\cmd.exe; /c C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e mkpath -- blib\lib\MIME': No such file or directory dmake.exe: Error code -1, while making 'blib\lib\MIME\.exists' 

After extensive research, I found that fixing the problem was to add SHELL = cmd.exe to the top of the makefile dmake file created by perl Makefile.PL, and then the module can be installed using

 dmake dmake install 

The problem is that no CPAN modules will be installed automatically without trying to install CPAN by editing the Makefile and running dmake manually in the cpan / build directory. Using the environment variable SHELL = cmd.exe or MAKESHELL = cmd.exe does NOT work, because the assembly does not work correctly if used.

Does anyone know why the problem is with my 64-bit Windows 7 machine?

Is there any configuration for cpan or some other technique, so I don’t need to manually edit and run the dmake makefile for each CPAN module for my perlberry perl installation?

+4
source share
2 answers

Do you already have dmake (MinGW) installed? For me, this works very well with a standard installation of x64 bit Windows.

Also, is your perl directory on the go? If this does not happen, you may have to restart your computer before installing CPAN modules (really!).

0
source

Your path seems to be a problem:

blib \ lib \ mime

Relative paths in MS Windows start with ". \"

. \ Blib \ Lib \ MIME

I would recommend you try it with an absolute path first. If it works, try relative.

0
source

Source: https://habr.com/ru/post/1483718/


All Articles