Can't install Perl using CPAN - Config_heavy.pl corrupt
Posted: 10. January 2009 18:06
I've just installed XAMPP 1.7.0 on my Dell Inspiron 1545 running Windows Vista Home Premium. I also installed "Patch1 for 1.7.0" and the "Perl 5.10.0-2.2.11" add-on.
I wanted to install some additional Perl modules from CPAN so I went to my C:\XAMPP\Perl\bin directory, ran "cpan" and tried to "install CGI::Session". The installation failed because cpan couldn't find "untar". This is because C:\XAMPP\Perl\lib\CPAN\Config.pm contains paths pointing to tools in the Microsoft VisualStudio .NET installation directory. I installed equivalent tools from the GnuWin32 distribution (bzip2, gzip, make, less, patch, tar, unzip, wget) and then ran "o conf init" in cpan to reinitialise the config. To avoid this in the future I suggest you ship XAMPP/Perl *WITHOUT* the CPAN/Config.pm file - it gets autogenerated by cpan if it isn't there.
Having sorted out the tools I ran the install command again, and it failed when it tried to create a directory called "c:C:\XAMPP\perl\html\site\lib\CGI". I eventually traced this is to C:\XAMPP\perl\lib\Config_heavy.pl containing pathnames beginning with "c:C:\XAMPP\". Either this file is corrupt in the XAMPP/Perl add-on distribution, or the installer screws it up when it replaces whatever path was there originally with the one I've installed XAMPP to. Either way, removing the stray "c:" at the start of the path allowed cpan to work.
It's worth mentioning that I also had to install NMAKE-1.5 from microsoft.com to get cpan installation to work for the Cache::Cache package, which is a prerequisite of HTML::Mason, which is the whole reason I'm installing XAMPP etc in the first place.
Finally, I did try going to bugs.xampp.org to report this bug but this site isn't responding.
I wanted to install some additional Perl modules from CPAN so I went to my C:\XAMPP\Perl\bin directory, ran "cpan" and tried to "install CGI::Session". The installation failed because cpan couldn't find "untar". This is because C:\XAMPP\Perl\lib\CPAN\Config.pm contains paths pointing to tools in the Microsoft VisualStudio .NET installation directory. I installed equivalent tools from the GnuWin32 distribution (bzip2, gzip, make, less, patch, tar, unzip, wget) and then ran "o conf init" in cpan to reinitialise the config. To avoid this in the future I suggest you ship XAMPP/Perl *WITHOUT* the CPAN/Config.pm file - it gets autogenerated by cpan if it isn't there.
Having sorted out the tools I ran the install command again, and it failed when it tried to create a directory called "c:C:\XAMPP\perl\html\site\lib\CGI". I eventually traced this is to C:\XAMPP\perl\lib\Config_heavy.pl containing pathnames beginning with "c:C:\XAMPP\". Either this file is corrupt in the XAMPP/Perl add-on distribution, or the installer screws it up when it replaces whatever path was there originally with the one I've installed XAMPP to. Either way, removing the stray "c:" at the start of the path allowed cpan to work.
It's worth mentioning that I also had to install NMAKE-1.5 from microsoft.com to get cpan installation to work for the Cache::Cache package, which is a prerequisite of HTML::Mason, which is the whole reason I'm installing XAMPP etc in the first place.
Finally, I did try going to bugs.xampp.org to report this bug but this site isn't responding.