jq
失败并显示:
$ jq
C:/cygwin64/bin/jq.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
如何找出缺少哪个库?
尝试
strace jq
:
$ strace jq
--- Process 15008 created
--- Process 15008 loaded C:\Windows\System32\ntdll.dll at 00007ffa97ab0000
--- Process 15008 loaded C:\Windows\System32\kernel32.dll at 00007ffa97990000
--- Process 15008 loaded C:\Windows\System32\KernelBase.dll at 00007ffa952c0000
--- Process 15008 thread 6216 created
--- Process 15008 thread 14800 created
--- Process 15008 loaded C:\cygwin64\bin\cygjq-1.dll at 00000005be860000
--- Process 15008 loaded C:\cygwin64\bin\cygwin1.dll at 00007ffa2b080000
--- Process 15008 thread 17460 created
--- Process 15008 thread 6216 exited with status 0xc0000135
--- Process 15008 thread 16484 exited with status 0xc0000135
--- Process 15008 thread 14800 exited with status 0xc0000135
--- Process 15008 exited with status 0xc0000135
最后你会看到一个对话框,上面写着:
cygonig-5.dll was not found
https://cygwin.com/cgi-bin2/package-grep.cgi?grep=cygoni告诉你这可能在libonig5中,所以:
apt-cyg install libonig5
现在
jq
可以工作了。