1

I currently have a Windows XP Pro SP3 server with XAMPP. I downloaded the Perl add-on for XAMPP earlier today, and it installed without a problem. After the install, I was able to go to .pl files on my server using a browser and they executed properly. I am trying to now install some Perl modules using CPAN, and I get a few error messages along the way, and the modules do not install. I am unfamiliar with Perl and would be grateful for any help. Below is what happens when I try to install a module:

cpan[4]> install Task::Kensho
Running install for module 'Task::Kensho'
Running make for A/AP/APEIRON/Task-Kensho-0.31.tar.gz
CPAN: LWP::UserAgent loaded ok (v5.817)

I would like to connect to one of the following sites to get 'authors/id/A/AP/AP
EIRON/Task-Kensho-0.31.tar.gz':

 http://www.perl.org/CPAN/
 ftp://ftp.perl.org/pub/CPAN/

Is it OK to try to connect to the Internet? [yes] yes
Fetching with LWP:
  http://www.perl.org/CPAN/authors/id/A/AP/APEIRON/Task-Kensho-0.31.tar.gz
CPAN: Digest::SHA loaded ok (v5.45)
Fetching with LWP:
  http://www.perl.org/CPAN/authors/id/A/AP/APEIRON/CHECKSUMS
Checksum for \.cpan\sources\authors\id\A\AP\APEIRON\Task-Kensho-0.31.tar.gz ok
Scanning cache \.cpan\build for sizes
............................................................................DONE

The system cannot find the path specified.
Uncompressed \.cpan\sources\authors\id\A\AP\APEIRON\Task-Kensho-0.31.tar.gz succ
essfully
Using Tar:"C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\bin\tar.EXE" xvf "
Task-Kensho-0.31.tar":
The system cannot find the path specified.
Couldn't untar Task-Kensho-0.31.tar
CPAN: File::Temp loaded ok (v0.18)
Package seems to come without Makefile.PL.
  (The test -f "\.cpan\build\APEIRON-zQFric\Makefile.PL" returned false.)
  Writing one on our own (setting NAME to TaskKensho)
  Had problems unarchiving. Please build manually
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
Failed during this command:
 APEIRON/Task-Kensho-0.31.tar.gz              : unwrapped NO -- untar failed

This particular line:

Using Tar:"C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\bin\tar.EXE" xvf "

Is referencing a file and directory that I do not have on my system. I am not sure of the significance of that, but I thought I would point it out.

Any help is greatly appreciated!

Update: @daxim , Thank you for the suggestion. I installed Strawberry Perl and was able to install all required modules for the script I am trying to run using cpan install [module name]. However, when I go to the script using a web browser, it does not compile and I am getting this in the Apache error log:

[Sun Jan 08 13:03:15 2012] [error] [client 192.168.1.1] Can't load 'C:/strawberry/perl/site/lib/auto/XML/LibXML/LibXML.dll' for module XML::LibXML: load_file:The specified module could not be found at C:/strawberry/perl/lib/DynaLoader.pm line 200.\r
[Sun Jan 08 13:03:15 2012] [error] [client 192.168.1.1]  at C:/strawberry/perl/site/lib/XML/LibXML.pm line 154\r
[Sun Jan 08 13:03:15 2012] [error] [client 192.168.1.1] BEGIN failed--compilation aborted at C:/strawberry/perl/site/lib/XML/LibXML.pm line 154.\r
[Sun Jan 08 13:03:15 2012] [error] [client 192.168.1.1] Compilation failed in require at C:/strawberry/perl/site/lib/XML/LibXML/SAX.pm line 17.\r
[Sun Jan 08 13:03:15 2012] [error] [client 192.168.1.1] BEGIN failed--compilation aborted at C:/strawberry/perl/site/lib/XML/LibXML/SAX.pm line 17.\r
[Sun Jan 08 13:03:15 2012] [error] [client 192.168.1.1] Compilation failed in require at (eval 27) line 1.\r

I did install XML::LibXML as well as other required modules. Thanks again for any help!

Robert
  • 95
  • 3
  • 10
  • Is this thread will be helpful to you? http://search.cpan.org/~spadkins/App-Context-0.968/lib/App/installguide/win32.pod – rpg Jan 06 '12 at 06:20
  • 1
    you can get tar.exe here: http://getgnuwin32.sourceforge.net/ – Richard Jan 06 '12 at 11:05
  • See my advice in http://stackoverflow.com/a/4873025/46395; additionally install Strawberry Perl or ActiveState Perl and use that instead of XAMPP Perl. – daxim Jan 07 '12 at 22:31
  • @daxim Thanks for the suggestion. Please see the original question, I added some information. I was able to install strawberry perl and all required modules for the script I am trying to run, but I am still not able to run the script when I go to it using a browser. The apache error log is in the original question. – Robert Jan 08 '12 at 21:20
  • Robert, it would have been better to split this follow-up question off [into a new one](http://stackoverflow.com/questions/ask). (Stack Overflow does not handle continually mutating the original one very well, also see the [FAQ](http://stackoverflow.com/faq) how the site is intended to work.) If the following does not help, [open a new question](http://stackoverflow.com/questions/ask). – daxim Jan 09 '12 at 15:29
  • From the [SO Perl FAQ](http://stackoverflow.com/questions/tagged/perl?sort=faq): read [How can I troubleshoot my Perl CGI script?](http://stackoverflow.com/q/2165022) sections *Does the script compile?* and *What happens when you run it from the command line?*. Make sure you and the Web server are running Strawberry Perl proper, not just XAMPP Perl with the Strawberry library path. – daxim Jan 09 '12 at 15:30

2 Answers2

1

I am also struggling with the same error message from Strawberry Perl.

Can't load 'C:/strawberry/perl/site/lib/auto/XML/LibXML/LibXML.dll'

I am seeing this error for XML::LibXML only. Maybe there is some issue with version of DLL packaged with XML::LibXML for Strawberry Perl but I am not sure.

I finally installed Activestate Perl and used the PPM tool that comes with Perl to install missing packages and everything went fine. You can also try PPM GUI in Windows:

Start Menu → All Programs → ActivePerl 5.14.2 Build 1402 → Perl Package Manager.

ЯegDwight
  • 24,821
  • 10
  • 45
  • 52
Jitender Mann
  • 81
  • 1
  • 4
1

I struggled with this for 2 days at work.

The issues is actually the global path for tar (and other Unix based programs) is incorrectly set. This happens if you have something like Git or Cygwin installed before Strawberry Perl, because they have Perl in them and it causes this issue I think.

To diagnose

Run cpan -J

Check if tar is set to an incorrect path /usr/bin/tar

If it is...

Solution

In the commandline:

perl -MCPAN -e shell

o conf init /tar/

From there enter the correct FULL path to either tar program in Git or Cygwin:

C:\\cygwin64\\bin\tar.exe

After that enter no when it ask if you want to use the external command instead of the build in Perl module.

Luke Watts
  • 601
  • 7
  • 15