java加载onnxruntime.dll报错Can‘t find dependent libraries

返回
Author Avatar
钢翼
2024-12-15
编程
472

如题,在本机win10下正常运行。放到服务器上windows server 2012上报错。

参考 https://blog.csdn.net/eifjgoergfgrgr/article/details/119613094 的查询思路。但是不是用他的解决方法。 因为缺的并不是同一个dll

下载 Dependency Walker 官网:https://dependencywalker.com/

在服务器上,打开 Dependency Walker ,并将onnxruntime.dll拖进去,发现缺少的dll是 api-ms-win-core-heap-l2-1-0.dll

在网上查看哪里有这个dll

参考 https://learn.microsoft.com/zh-cn/answers/questions/1654184/api-ms-win-core-heap-l2-1-0-dll

在 https://github.com/yycmagic/onnxruntime-for-win7 仓库中找到对应的dll,并放到服务器的system32目录即可。