Cygwin库加载错误


13

我先建立了spacespaceite库,然后建立了带有spacealite支持的gdal库。还构建了依赖于gdal成功的mapserver。链接没有问题。

当我尝试执行gdal实用程序时,我得到:

$ ogrinfo.exe
/usr/local/bin/ogrinfo.exe: error while loading shared libraries: cyggdal-1.dll: cannot open shared object file: No such file or directory

但是一切似乎都很好:

$ ldd /usr/local/bin/ogrinfo.exe
        ntdll.dll => /cygdrive/c/WINDOWS/system32/ntdll.dll (0x7c900000)
        kernel32.dll => /cygdrive/c/WINDOWS/system32/kernel32.dll (0x7c800000)
        cyggdal-1.dll => /usr/local/bin/cyggdal-1.dll (0x710c0000)
        cygcurl-4.dll => /usr/bin/cygcurl-4.dll (0x63d80000)
        cyggcc_s-1.dll => /usr/bin/cyggcc_s-1.dll (0x67f00000)
        cygwin1.dll => /usr/bin/cygwin1.dll (0x61000000)
        ADVAPI32.DLL => /cygdrive/c/WINDOWS/system32/ADVAPI32.DLL (0x77dd0000)
        RPCRT4.dll => /cygdrive/c/WINDOWS/system32/RPCRT4.dll (0x77e70000)
        Secur32.dll => /cygdrive/c/WINDOWS/system32/Secur32.dll (0x77fe0000)
        cygcrypto-0.9.8.dll => /usr/bin/cygcrypto-0.9.8.dll (0x6ba40000)
        cygidn-11.dll => /usr/bin/cygidn-11.dll (0x6c200000)
        cygiconv-2.dll => /usr/bin/cygiconv-2.dll (0x674c0000)
        cygintl-8.dll => /usr/bin/cygintl-8.dll (0x6f5c0000)
        cygssh2-1.dll => /usr/bin/cygssh2-1.dll (0x69ec0000)
        cygz.dll => /usr/bin/cygz.dll (0x692c0000)
        cygssl-0.9.8.dll => /usr/bin/cygssl-0.9.8.dll (0x63400000)
        cygexpat-1.dll => /usr/bin/cygexpat-1.dll (0x66ec0000)
        cyggeos_c-1.dll => /usr/bin/cyggeos_c-1.dll (0x70180000)
        cyggeos-3-1-1.dll => /usr/bin/cyggeos-3-1-1.dll (0x4e0000)
        cygjpeg-7.dll => /usr/bin/cygjpeg-7.dll (0x66e00000)
        cygpng12.dll => /usr/bin/cygpng12.dll (0x6f200000)

如果我将cyggdal-1.dll复制到当前文件夹:

$ ogrinfo.exe
/usr/local/bin/ogrinfo.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

那么什么是“?” 图书馆?

$ ldd cyggdal-1.dll
        ntdll.dll => /cygdrive/c/WINDOWS/system32/ntdll.dll (0x7c900000)
        kernel32.dll => /cygdrive/c/WINDOWS/system32/kernel32.dll (0x7c800000)
        ??? => ??? (0x710c0000)
        ??? => ??? (0x63d80000)
        ??? => ??? (0x67f00000)
        ??? => ??? (0x61000000)
        ??? => ??? (0x77dd0000)
        ??? => ??? (0x77e70000)
        ??? => ??? (0x77fe0000)
        ??? => ??? (0x6ba40000)
        ??? => ??? (0x6c200000)
        ??? => ??? (0x674c0000)
        ??? => ??? (0x6f5c0000)
        ??? => ??? (0x69ec0000)
        ??? => ??? (0x692c0000)
        ??? => ??? (0x63400000)
        ??? => ??? (0x66ec0000)
        ??? => ??? (0x70180000)
        ??? => ??? (0x4b0000)
        ??? => ??? (0x66e00000)
        ??? => ??? (0x6f200000)

这些是什么 ”???” ?如何解决这个问题呢?

Answers:


28

使用cygcheck /usr/bin/[yourbinary](示例/usr/bin/curl

它会告诉您找不到的任何内容。(它将显示“找不到[some.dll]”。)

只需安装dll命名的软件包。

例如-当我跑步时:

$ curl

它返回:

/usr/bin/curl.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

所以我跑了:

$ cygcheck /usr/bin/curl

它返回:

cygcheck: track_down: could not find cygsasl2-2.dll

因此,我安装了“ libsasl2”软件包。

它是一个通过setup.exe(cygwin安装程序)安装的运行时库,curl开始正常运行。


直到现在我才知道此工具,它也指出了我的问题的原因:“ cygcheck:track_down:找不到cygsasl2-2.dll”。非常感谢。
马特·塞特

1

我使用cmd执行该实用程序,它显示了一个弹出窗口,其中包含缺少dll的名称。


0

就我而言,我想安装SSH。 它抱怨缺少“ cyggssapi-3.dll”。我重新安装了Cygwin,并确保不要安装任何其他东西,并安装正确版本的SSH + SSL。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.