I'm on Mac OS 10.6. I did some weird stuff trying to run a Jekyll and Node.js based site locally, which didn't work, and I'm now having problems with basic git functionality. The earlier process involved installing Homebrew and upgrading Ruby.

When I run git pull from within a repository, I get

dyld: Library not loaded: /usr/lib/libcurl.4.dylib Referenced from: /usr/libexec/git-core/git-remote-https Reason: Incompatible library version: git-remote-https requires version 7.0.0 or later, but libcurl.4.dylib provides version 6.0.0

I tried a suggestion from a similar question, and when I entered which curl , I got /usr/bin/curl.

I thought perhaps upgrading git might help, so I did brew install git and got the following (see below), which seemed to indicate that I'm on the current version (2.8.1). However after that, git --version returns git version (Apple Git-26).

No idea what to do next. How can I get git working again?

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):

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
    The error is basically about your Mac OS X 10.6 version of libcurl.4.dylib being out of date. So that said, was Git seriously working before? If so, you might have been loading the default Xcode version of Git initially and then your $PATH was changed at some point in your .bash_profile to attempt to use the Homebrew install. Which basically means you have a bit of a mess. You can attempt to edit your .bash_profile to fix things, but I would generally recommend you just install/upgrade Git via the official installer here. – Giacomo1968 Jul 23 '16 at 18:50
  • @JakeGould I followed the link you sent and downloaded the installer for git 2.9.2. I installed it "successfully" (the installer showed a success message), but then I quit Terminal, re-launched, and now git --version returns Illegal instruction. Also simply git returns Illegal instruction as well. – Mike Eng Jul 25 '16 at 1:37
  • 1
    Well, that could be a positive thing! Look at this thread here on Stack Overflow. I haven’t touched Snow Leopard (10.6) in a while, but perhaps you need to downgrade the version you installed via the method I recommend. In general if you can upgrade to at least Mac OS X 10.8 or Mac OS X 10.9.5 you should be in better shape. – Giacomo1968 Jul 25 '16 at 2:03

I resolved this by uninstalling git. Turns out I had multiple installations in different places, so I had to do:

$ which git

and then using the path that returned:

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

three times until $ which git returned nothing. Then I installed git

Then when I ran $ git, I was getting:

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

But quitting and relaunching Terminal resolved that, and git seems to be working properly now.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.