Git在Mac OS X 10.6上返回“ dyld:库未加载:/usr/lib/libcurl.4.dylib”错误


0

我在Mac OS 10.6上。我做了一些奇怪的事情,试图在本地运行一个基于Jekyll和Node.js的站点,但是这不起作用,而且我现在在基本git功能方面遇到了问题。较早的过程涉及安装Homebrew和升级Ruby。

当我git pull从存储库中运行时,我得到

dyld:库未加载:/usr/lib/libcurl.4.dylib引用自:/ usr / libexec / git-core / git-remote-https原因:库版本不兼容:git-remote-https需要版本7.0.0或之后,但是libcurl.4.dylib提供了6.0.0版本

我尝试了一个类似问题的建议,当我进入时which curl,我得到了/usr/bin/curl

我认为也许升级git可能会有所帮助,所以我做到brew install git以下几点(请参阅下文),这似乎表明我使用的是当前版本(2.8.1)。但是之后,git --version返回git version 1.7.7.5 (Apple Git-26)

不知道下一步该怎么做。我如何才能再次使用git?

Warning: You are using OS X 10.6.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
==> Downloading https://www.kernel.org/pub/software/scm/git/git-2.8.1.tar.xz
Already downloaded: /Library/Caches/Homebrew/git-2.8.1.tar.xz
==> make install prefix=/usr/local/Cellar/git/2.8.1 sysconfdir=/usr/local/etc CC
Last 15 lines from /Users/mikeeng/Library/Logs/Homebrew/git/01.make:
    sed -e '1{' \
        -e '    s|#!.*perl|#!/usr/bin/perl|' \
        -e '    h' \
        -e '    s=.*=use lib (split(/:/, $ENV{GITPERLLIB} || "'"$INSTLIBDIR"'"));=' \
        -e '    H' \
        -e '    x' \
        -e '}' \
        -e 's/@@GIT_VERSION@@/2.8.1/g' \
        git-add--interactive.perl >git-add--interactive+ && \
    chmod +x git-add--interactive+ && \
    mv git-add--interactive+ git-add--interactive
make[2]: *** No rule to make target `/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE/config.h', needed by `perl.mak'.  Stop.
make[1]: *** [instlibdir] Error 2
make: *** [git-add--interactive] Error 2
make: *** Waiting for unfinished jobs....

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/Homebrew/homebrew-core/issues

These open issues may also help:
git-annex 6.20160619 https://github.com/Homebrew/homebrew-core/pull/3228
hg-git 0.8.5 (new formula) https://github.com/Homebrew/homebrew-core/pull/2577
git: cannot run gitk https://github.com/Homebrew/homebrew-core/issues/115
git-webui 1.2.0 (new formula) https://github.com/Homebrew/homebrew-core/pull/1648
cannot install on Mac OSX 10.8.5 ==> Downloading and installing Homebrew... You must: brew install git You must: brew install git Error: Git is unavailable https://github.com/Homebrew/homebrew-core/issues/2385
git-gitlab 0.1.0 (new formula) https://github.com/Homebrew/homebrew-core/pull/1064
git-stree: added deprecation warning and fixed line order https://github.com/Homebrew/homebrew-core/pull/1842
Warning: You are using OS X 10.6.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.

1
该错误基本上与您的Mac OS X 10.6版本libcurl.4.dylib已过时有关。如此说来,Git之前是否认真工作过?如果是这样,您可能最初已经加载了默认的Git Xcode版本,然后$PATH在某些时候.bash_profile尝试使用Homebrew安装进行了更改。这基本上意味着您有点混乱。您可以尝试编辑.bash_profile以解决问题,但通常建议您通过此处的官方安装程序安装/升级Git 。
JakeGould '16

@JakeGo我应该跟随您发送的链接并下载git 2.9.2的安装程序。我“成功”安装了它(安装程序显示了成功消息),但是随后我退出Terminal,重新启动,然后git --version返回Illegal instruction。也简单地git返回Illegal instruction
Mike Eng

1
好吧,那可能是一件积极的事情!在Stack Overflow上查看此线程。我已经有一段时间没有接触过Snow Leopard(10.6)了,但是也许您需要通过我推荐的方法降级安装的版本。通常,如果您可以至少升级到Mac OS X 10.8或Mac OS X 10.9.5,则您的状态应该会更好。
JakeGould '16

Answers:


0

我通过卸载git解决了这个问题。原来我在不同的地方有多个安装,所以我必须这样做:

$ which git

然后使用返回的路径:

$ sudo rm -rf /absolute/path/to/git

三遍,直到$ which git一无所获。然后我安装了git 1.8.4.2

然后,当我跑步时$ git,我得到:

-bash: /usr/bin/git: No such file or directory

但是退出并重新启动Terminal可以解决该问题,并且git现在似乎可以正常工作。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.