我在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.
@JakeGo我应该跟随您发送的链接并下载git 2.9.2的安装程序。我“成功”安装了它(安装程序显示了成功消息),但是随后我退出Terminal,重新启动,然后
—
Mike Eng
git --version
返回Illegal instruction
。也简单地git
返回Illegal instruction
。
好吧,那可能是一件积极的事情!在Stack Overflow上查看此线程。我已经有一段时间没有接触过Snow Leopard(10.6)了,但是也许您需要通过我推荐的方法降级安装的版本。通常,如果您可以至少升级到Mac OS X 10.8或Mac OS X 10.9.5,则您的状态应该会更好。
—
JakeGould '16
libcurl.4.dylib
已过时有关。如此说来,Git之前是否认真工作过?如果是这样,您可能最初已经加载了默认的Git Xcode版本,然后$PATH
在某些时候.bash_profile
尝试使用Homebrew安装进行了更改。这基本上意味着您有点混乱。您可以尝试编辑.bash_profile
以解决问题,但通常建议您通过此处的官方安装程序安装/升级Git 。