2

I need to check if the installed version of git on a number of systems is built against gnutls or openssl. A method to do this can be found here but relies on having binary git-http-fetch installed against which "ldd git-http-fetch" can be run. For example, I see this on Ubuntu 16.04 with git 2.7.4. I can provide the argument http-fetch to git to access the same function, but this doesn't help since I want to use ldd to probe which shared objects will be linked. I could simply run a git transaction with strace and then grep for libraries actually loaded, but this requires a test endpoint and seems unwieldy.

How can I install this additional binary? Alternatively, how can I adapt the instructions from the previous question in the absence of this binary?

4

1 回答 1

0

首先 - 搜索 Ubuntu 上的哪个包提供了 git-http-fetch

https://packages.ubuntu.com/search?suite=xenial&arch=any&mode=exactfilename&searchon=contents&keywords=git-http-fetch

令我惊讶的是,答案是 git 包,但文件被埋在 /usr/lib/git-core/git-http-fetch 和 /usr/lib/git-core 不在我的 PATH 中。

所以下面的命令解决了我的问题。

ldd /usr/lib/git-core/git-http-fetch | grep gnutls

请注意 Ubuntu 16.04 及更早版本的 git-all 软件包问题,我错误地认为这可能会有所帮助。有一个错误意味着这将无法正确安装。见https://bugs.launchpad.net/ubuntu/+source/runit/+bug/1448164

于 2018-11-22T08:41:15.117 回答