Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git + mountain lion + dyld: lazy symbol binding failed: Symbol not found: ___strlcpy_chk

Tags:

git

macos

  • os: mac os 10.8.3
  • xcode: 4.6.3 w command line tools installed
  • /usr/local/bin/git -> /usr/local/git/bin/git

any ideas how to fix?

(the discussion threads i was able to find on the topic mentioned a) installing the command line tools and b) making sure that /usr/local/bin was included in the PATH, both of which i seem to have done here.)

thank you in advance.

git init
dyld: lazy symbol binding failed: Symbol not found: ___strlcpy_chk
  Referenced from: /usr/local/bin/git
  Expected in: /usr/lib/libSystem.B.dylib
like image 622
oana Avatar asked Apr 07 '14 18:04

oana


3 Answers

I came up with this issue because I installed git-2.2.1-intel-universal-mavericks.dmg, actually mavericks(10.9.x) is latter version than mountain lion(10.8.x), and snow-leopard is earlier than mountain lion, after I installed git-2.2.1-intel-universal-snow-leopard, this issue had gone.

like image 100
Robin Liu Avatar answered Nov 12 '22 12:11

Robin Liu


I had the exact same issue and this is how I fixed it,

Followed this article to install command line tools for xCode(I got xCode 5.1).

Then also edited my .bash_profile

$vi ~/.bash_profile

export PATH=$PATH:/usr/local/git/bin/

Even after doing these 2 things, I was getting the same error with git command line. But then I had Restart my computer to it to work.

Hope this will help.

like image 3
Thanu Avatar answered Nov 12 '22 12:11

Thanu


Oana, I was also having troubles with the same error message you quoted. I tried the PATH trick (didn't help). I wasn't really interested in installing Xcode and then the 'Command Line Tools' as others had suggested. But I did stumble upon half an answer.

First, I uninstalled my current version of Git (1.9.2). I then found that it is possible to install the Command Line Tools by themselves, without installing Xcode:

Xcode page: https://developer.apple.com/xcode/ ->

Downloads near the top ->

Scroll down to 'Additional Tools'->'

View Downloads'-> Command Line Tools (OS X Mountain Lion)

With those installed, doing 'git --version' returned this:

git version 1.8.5.2 (Apple Git-48)

The file "/usr/lib/libSystem.B.dylib" was untouched during this process. Or at least, the file size and date did not change.

It is my guess that the issue was created in a more recent version of git, one that is checking for the symbol in question, whereas the older versions don't check for it. I thought about testing that theory and found the older source code for various versions of Git, but didn't have time to spend compiling/installing/testing each one to see if this theory is correct. And I didn't see a simple method of uninstalling the 'command line tools'. Maybe someone else is more intrepid. :)

-- J

like image 3
Cronk Avatar answered Nov 12 '22 12:11

Cronk