现在的位置: 首页 > 综合 > 正文

解决Cygwin “error while loading shared libraries”的问题

2018年07月16日 ⁄ 综合 ⁄ 共 4210字 ⁄ 字号 评论关闭

使用cygcheck命令:

1 cygcheck
/usr/bin/[yourbinary]

例如当我运行curl的时候提示

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

此时运行cygcheck

01 $
cygcheck /usr/bin/curl.exe
02 C:\Users\Helios\Cygwin\bin\curl.exe
03   C:\Users\Helios\Cygwin\bin\cygcurl-4.dll
04     C:\Users\Helios\Cygwin\bin\cyggcc_s-1.dll
05       C:\Users\Helios\Cygwin\bin\cygwin1.dll
06         C:\Windows\system32\KERNEL32.dll
07           C:\Windows\system32\API-MS-Win-Core-RtlSupport-L1-1-0.dll
08           C:\Windows\system32\ntdll.dll
09           C:\Windows\system32\KERNELBASE.dll
10           C:\Windows\system32\API-MS-Win-Core-ProcessThreads-L1-1-0.dll
11           C:\Windows\system32\API-MS-Win-Core-Heap-L1-1-0.dll
12           C:\Windows\system32\API-MS-Win-Core-Memory-L1-1-0.dll
13           C:\Windows\system32\API-MS-Win-Core-Handle-L1-1-0.dll
14           C:\Windows\system32\API-MS-Win-Core-Synch-L1-1-0.dll
15           C:\Windows\system32\API-MS-Win-Core-File-L1-1-0.dll
16           C:\Windows\system32\API-MS-Win-Core-IO-L1-1-0.dll
17           C:\Windows\system32\API-MS-Win-Core-ThreadPool-L1-1-0.dll
18           C:\Windows\system32\API-MS-Win-Core-LibraryLoader-L1-1-0.dll
19           C:\Windows\system32\API-MS-Win-Core-NamedPipe-L1-1-0.dll
20           C:\Windows\system32\API-MS-Win-Core-Misc-L1-1-0.dll
21           C:\Windows\system32\API-MS-Win-Core-SysInfo-L1-1-0.dll
22           C:\Windows\system32\API-MS-Win-Core-Localization-L1-1-0.dll
23           C:\Windows\system32\API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll
24           C:\Windows\system32\API-MS-Win-Core-String-L1-1-0.dll
25           C:\Windows\system32\API-MS-Win-Core-Debug-L1-1-0.dll
26           C:\Windows\system32\API-MS-Win-Core-ErrorHandling-L1-1-0.dll
27           C:\Windows\system32\API-MS-Win-Core-Fibers-L1-1-0.dll
28           C:\Windows\system32\API-MS-Win-Core-Util-L1-1-0.dll
29           C:\Windows\system32\API-MS-Win-Core-Profile-L1-1-0.dll
30           C:\Windows\system32\API-MS-Win-Security-Base-L1-1-0.dll
31     C:\Users\Helios\Cygwin\bin\cygcrypto-1.0.0.dll
32       C:\Users\Helios\Cygwin\bin\cygz.dll
33     C:\Users\Helios\Cygwin\bin\cyggssapi-3.dll
34       C:\Users\Helios\Cygwin\bin\cygheimntlm-0.dll
35         C:\Users\Helios\Cygwin\bin\cygkrb5-26.dll
36           C:\Users\Helios\Cygwin\bin\cygasn1-8.dll
37             C:\Users\Helios\Cygwin\bin\cygroken-18.dll
38               C:\Users\Helios\Cygwin\bin\cygcrypt-0.dll
39             C:\Users\Helios\Cygwin\bin\cygcom_err-2.dll
40           C:\Users\Helios\Cygwin\bin\cygwind-0.dll
41           C:\Users\Helios\Cygwin\bin\cyghx509-5.dll
42           C:\Users\Helios\Cygwin\bin\cygintl-8.dll
43             C:\Users\Helios\Cygwin\bin\cygiconv-2.dll
44           C:\Users\Helios\Cygwin\bin\cygsqlite3-0.dll
45           C:\Users\Helios\Cygwin\bin\cygheimbase-1.dll
46     C:\Users\Helios\Cygwin\bin\cygidn-11.dll
47     C:\Users\Helios\Cygwin\bin\cyglber-2-4-2.dll
48     C:\Users\Helios\Cygwin\bin\cygldap-2-4-2.dll
49       C:\Users\Helios\Cygwin\bin\cygssl-1.0.0.dll
50     C:\Users\Helios\Cygwin\bin\cygssh2-1.dll
51   C:\Users\Helios\Cygwin\bin\cygmetalink-3.dll
52     C:\Users\Helios\Cygwin\bin\cygexpat-1.dll
53 cygcheck:
track_down: could not 
find cygsasl2-2.dll

即可找到缺失的文件

转载:http://my.oschina.net/funs/blog/109345

How
do I install cURL on cygwin (latest versions checked in setup - cyg complains missing .DLL)

There are other posts about this from 2011 but they do not have answers marked accepted (see here).

My Cygwin complains about the missing .DLL as follows:

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

抱歉!评论已关闭.