최근 cygwin을 다시 설치하고 curl을 실행했더니 아래와 같은 오류가 발생했다.
$ curl /usr/bin/curl.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
ldd을 이용해서 설치되지 않은 라이브러리를 찾던 도중 cygcurl-4.dll에서 아래와 같은 무수한 ???를 만나게 되었다.
$ ldd /usr/bin/cygcurl-4.dll ntdll.dll => /cygdrive/c/Windows/SysWOW64/ntdll.dll (0x77700000) kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x75640000) KERNELBASE.dll => /cygdrive/c/Windows/syswow64/KERNELBASE.dll (0x74ff0000) ??? => ??? (0x63f80000) ??? => ??? (0x6ff60000) ??? => ??? (0x61000000) ??? => ??? (0x68b80000) ??? => ??? (0x6f550000) ??? => ??? (0x6b440000) ??? => ??? (0x67d40000) ??? => ??? (0x71440000) ??? => ??? (0x6a840000) ??? => ??? (0x6bc80000) ??? => ??? (0x44000000) ??? => ??? (0x70ec0000) ??? => ??? (0x67140000) ??? => ??? (0x6c100000) ??? => ??? (0x6fd50000) ??? => ??? (0x6fd70000) ??? => ??? (0x64d80000) ??? => ??? (0x71040000) ??? => ??? (0x6c400000) ??? => ??? (0x10000000) ??? => ??? (0x410000)
???의 정체를 알기 위해 구글링해본 결과 cygcheck을 사용해보라는 글이 있어서 cygcheck을 사용해 보았다.
$ cygcheck /bin/cygcurl-4.dll C:\cygwin\bin\cygcurl-4.dll C:\cygwin\bin\cyggcc_s-1.dll C:\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:\cygwin\bin\cygcrypto-1.0.0.dll C:\cygwin\bin\cygz.dll C:\cygwin\bin\cyggssapi-3.dll C:\cygwin\bin\cygheimntlm-0.dll C:\cygwin\bin\cygkrb5-26.dll C:\cygwin\bin\cygasn1-8.dll C:\cygwin\bin\cygroken-18.dll C:\cygwin\bin\cygcrypt-0.dll C:\cygwin\bin\cygcom_err-2.dll C:\cygwin\bin\cygwind-0.dll C:\cygwin\bin\cyghx509-5.dll C:\cygwin\bin\cygintl-8.dll C:\cygwin\bin\cygiconv-2.dll C:\cygwin\bin\cygsqlite3-0.dll C:\cygwin\bin\cygheimbase-1.dll C:\cygwin\bin\cygidn-11.dll C:\cygwin\bin\cyglber-2-4-2.dll C:\cygwin\bin\cygldap-2-4-2.dll cygcheck: track_down: could not find cygsasl2-2.dll C:\cygwin\bin\cygssl-1.0.0.dll C:\cygwin\bin\cygssh2-1.dll
중간에 cygsasl2-2.dll이 없다고 나왔고, 관련 라이브러리를 설치 한 후 curl 실행 오류도 해결되었다.