daan-banaan
daan-banaan

Reputation: 23

Perl Error: Can't load GD.xs.dll for module GD

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.

Upvotes: 1

Views: 788

Answers (1)

daan-banaan
daan-banaan

Reputation: 23

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...

Upvotes: 1

Related Questions