我已经在我的Windows Server 2019机器上安装了Strawberry Perl,当我尝试运行perl脚本时,Apache服务器一直给我以下错误:
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
当我打开位置C:\usr\site\lib\auto\GD\时,GD.xs.dll就在那里,所以它没有丢失。
这些脚本以前在我使用ActivePerl的时候是有效的。我尝试过重新安装GD (在cpan:force install GD中),并升级了所有模块(在cpan:upgrade中),但似乎没有任何效果。我是不是遗漏了一些依赖项?或者是因为我运行的是x64机器,而dll文件与64位系统不兼容?
如果有人能帮上忙,我将非常感激,因为这已经开始让我抓狂了。
发布于 2019-12-06 00:06:18
回答我自己的问题:显然Windows需要在启动或其他什么时候加载dll文件,因为在重启我的机器后,它似乎可以工作……
https://stackoverflow.com/questions/59179848
复制相似问题