Search code examples
macosgitversion-controlterminalclone

Git commands not working in Mac terminal: "dyld: Symbol not found: ___strlcpy_chk" error


I am using the command git clone ssh://.... and getting the following error on the terminal:

dyld: lazy symbol binding failed: Symbol not found: ___strlcpy_chk
  Referenced from: /usr/local/git/bin/git
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ___strlcpy_chk
  Referenced from: /usr/local/git/bin/git
  Expected in: /usr/lib/libSystem.B.dylib

Trace/BPT trap: 5

Solution

  • I needed to install command line tools from Xcode. To do so-

    1. Open Xcode and hit Cmd+,
    2. Click Downloads
    3. Install command line tools.

    http://www.hongkiat.com/blog/mountain-lion-git-fix/