“ppm.bat install failed: Can't find any package that provides MinGW”

元气小坏坏 提交于 2020-02-01 04:56:05

问题


I am trying to install a missing Perl module (Palm::PDB) in Windows 7.

I have tried the following:

  1. Using Perl Package Manager: unfortunately it does not seem to find the module I want.

  2. Starting a CPAN shell in Windows using the command prompt: unfortunately it shows the following error. I have installed MinGW and also have set the path.

    D:\Scripts>perl -MCPAN -e 'shell' install Palm::PDB
    
    It looks like you don't have a C compiler and make utility installed.  Trying
    to install dmake and the MinGW gcc compiler using the Perl Package Manager.
    This may take a few minutes...
    
    ppm.bat install failed: Can't find any package that provides MinGW
    
    It looks like the installation of dmake and MinGW has failed.  You will not be
    able to run Makefile commands or compile C extension code.  Please check your
    internet connection and your proxy settings!
    

Is there any other easy way to install Perl modules on Windows?


回答1:


Something is wrong with your ActiveState Perl install because it will automatically install dmake and MinGW for you.

If you have dmake.exe installed try to install MinGW by running these commands:

ppm install MinGW
perl Makefile.PL
dmake
dmake test
dmake install

Also MinGW and dmake are being installed into C:\Perl\site\bin. Make sure this directory is on your PATH (done by default by the ActivePerl installer).




回答2:


An easy way to use Perl on Windows is to use a recent release of StrawberryPerl. It has dmake and a C compiler (gcc) bundled. The cpan command just works out of the box.




回答3:


ActiveState do a review of all modules they release for PPM. So it often doesn't have modules which are not in high demand, or ones which have been recently released.

The fastest way to get this working on Windows is to install Strawberry Perl because, out of the box, it comes with a C compiler that is ready to be used with CPAN. That will save you from all the troubles of configuring MingW.




回答4:


cpan try to find a C compiler - probably this module or some dependencies has native code (for database drivers is more common). MingW is a gcc port for Windows.

If it does not work, try to install a virtual machine with linux and install gcc :)




回答5:


I solved it, I cleaned AppData folder of ActivePerl.

C:\Users\%YOUR_USERNAME%\AppData\Local\ActiveState\ActivePerl\

Delete all data from that folder. And rerun ppm again! It worked.




回答6:


For me it worked after clearing the content from this location C:\Users\%YOUR_USERNAME%\AppData\Local\ActiveState\ActivePerl\

C:\WINDOWS\system32>ppm install MinGW

Downloading ActiveState Package Repository dbimage...done Downloading MinGW-4.6.3...done Downloading dmake-4.11.20080107...done Unpacking MinGW-4.6.3...done Unpacking dmake-4.11.20080107...done Generating HTML for MinGW-4.6.3...done Generating HTML for dmake-4.11.20080107...done Updating files in site area...done 3697 files installed

Thank you @Void




回答7:


perl -MCPAN -e shell

install SOAP::Lite

if anyone has same issue on windows 10, use the above command on windows command line. It worked for me.



来源:https://stackoverflow.com/questions/10545976/ppm-bat-install-failed-cant-find-any-package-that-provides-mingw

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!