使用cygcheck命令:
cygcheck /usr/bin/[yourbinary]
例如当我运行curl的时候提示
/usr/bin/curl.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
此时运行cygcheck
$ cygcheck /usr/bin/curl.exe
C:\Users\Helios\Cygwin\bin\curl.exe
C:\Users\Helios\Cygwin\bin\cygcurl-4.dll
C:\Users\Helios\Cygwin\bin\cyggcc_s-1.dll
C:\Users\Helios\Cygwin\bin\cygwin1.dll
C:\Windows\system32\KERNEL32.dll
C:\Windows\system32\API-MS-Win-Core-RtlSupport-L1-1-0.dll
C:\Windows\system32\ntdll.dll
C:\Windows\system32\KERNELBASE.dll
C:\Windows\system32\API-MS-Win-Core-ProcessThreads-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Heap-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Memory-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Handle-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Synch-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-File-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-IO-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-ThreadPool-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-LibraryLoader-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-NamedPipe-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Misc-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-SysInfo-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Localization-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-String-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Debug-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-ErrorHandling-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Fibers-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Util-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Profile-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Security-Base-L1-1-0.dll
C:\Users\Helios\Cygwin\bin\cygcrypto-1.0.0.dll
C:\Users\Helios\Cygwin\bin\cygz.dll
C:\Users\Helios\Cygwin\bin\cyggssapi-3.dll
C:\Users\Helios\Cygwin\bin\cygheimntlm-0.dll
C:\Users\Helios\Cygwin\bin\cygkrb5-26.dll
C:\Users\Helios\Cygwin\bin\cygasn1-8.dll
C:\Users\Helios\Cygwin\bin\cygroken-18.dll
C:\Users\Helios\Cygwin\bin\cygcrypt-0.dll
C:\Users\Helios\Cygwin\bin\cygcom_err-2.dll
C:\Users\Helios\Cygwin\bin\cygwind-0.dll
C:\Users\Helios\Cygwin\bin\cyghx509-5.dll
C:\Users\Helios\Cygwin\bin\cygintl-8.dll
C:\Users\Helios\Cygwin\bin\cygiconv-2.dll
C:\Users\Helios\Cygwin\bin\cygsqlite3-0.dll
C:\Users\Helios\Cygwin\bin\cygheimbase-1.dll
C:\Users\Helios\Cygwin\bin\cygidn-11.dll
C:\Users\Helios\Cygwin\bin\cyglber-2-4-2.dll
C:\Users\Helios\Cygwin\bin\cygldap-2-4-2.dll
C:\Users\Helios\Cygwin\bin\cygssl-1.0.0.dll
C:\Users\Helios\Cygwin\bin\cygssh2-1.dll
C:\Users\Helios\Cygwin\bin\cygmetalink-3.dll
C:\Users\Helios\Cygwin\bin\cygexpat-1.dll
cygcheck: track_down: could not find cygsasl2-2.dll
即可找到缺失的文件