1

I've installed Strawberry Perl on my Windows Server 2019 machine and my Apache server keeps giving me the following errors when I try to run perl scripts:

Can't load 'C:/usr/site/lib/auto/GD/GD.xs.dll' for module GD: load_file:The specified module could not be found at C:/usr/lib/DynaLoader.pm line 193.: D:/www/update/cgi-bin/FILENAME.pl, referer: http://update/cgi-bin/FILENAME.pl

: D:/www/update/cgi-bin/FILENAME.pl, referer: http://update/cgi-bin/FILENAME.pl

Compilation failed in require at C:/usr/site/lib/GD/Simple.pm line 160.: D:/www/update/cgi-bin/FILENAME.pl, referer: http://update/cgi-bin/FILENAME.pl

BEGIN failed--compilation aborted at C:/usr/site/lib/GD/Simple.pm line 160.: D:/www/update/cgi-bin/FILENAME.pl, referer: http://update/cgi-bin/FILENAME.pl

Compilation failed in require at D:/www/update/cgi-bin/FILENAME.pl line 8.: D:/www/update/cgi-bin/FILENAME.pl, referer: http://update/cgi-bin/FILENAME.pl

BEGIN failed--compilation aborted at D:/www/update/cgi-bin/FILENAME.pl line 8.: D:/www/update/cgi-bin/FILENAME.pl, referer: http://update/cgi-bin/FILENAME.pl

When I open the location C:\usr\site\lib\auto\GD\ the GD.xs.dll is sitting right there, so it's not missing.

These scripts worked before when I was using ActivePerl. I've tried to reinstall GD (in cpan: force install GD) and upgraded all modules (in cpan: upgrade) but that doesn't seem to do anything. Am I maybe missing some dependencies? Or is because I'm running a x64 machine and the dll file is incompatible with a 64bit system?

If anyone can help it would be greatly appreciated because this is starting to drive me mad.

  • What command are you running when you get those errors? – Håkon Hægland Dec 04 '19 at 19:14
  • The error might not be referring to `GD.xs.dll` itself but to another library used by `GD.xs.dll`. Easiest solution might be to reinstall GD – ikegami Dec 04 '19 at 22:41
  • @HåkonHægland I've updated my question. It's my Apache server that gives me these errors. – daan-banaan Dec 05 '19 at 08:33
  • @ikegami Is there any way to find out if it's indeed another library and, if so, which one? Also, how would I reinstall GD? I already did a ```force install GD``` in cpan. – daan-banaan Dec 05 '19 at 08:35
  • There are tools to inspect libraries, but I'm not familiar with them // That would reinstall, yes. If you still have the problem, then it more complicated then a library being removed/renamed since GD.xs.dll was created. – ikegami Dec 05 '19 at 08:46

1 Answers1

1

Answering my own question: apparently Windows needs to load the dll file on startup or something because after restarting my machine it seems to work...