Skip to content

Instantly share code, notes, and snippets.

@Gedrovits
Last active May 3, 2018 21:50
Show Gist options
  • Save Gedrovits/8218833 to your computer and use it in GitHub Desktop.
Save Gedrovits/8218833 to your computer and use it in GitHub Desktop.
How to fix 'dyld: lazy symbol binding failed: Symbol not found: _yajl_set_static_value'
# Copy the gem location to clipboard
bundle show yajl-ruby | pbcopy
# Example: /Users/gedrovits/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/yajl-ruby-0.8.2
cd <cmd + v>
cd ext/yajl
# Now we need to replace 'inline void' to 'static void'. This will also create backup of old files.
sed -i '.bak' 's/inline void/static void/g' yajl_ext.h yajl_ext.c
# Now we must rebuild changed extension
make clean all
# After this you should not have any problems with yajl-ruby
# Original found on http://tom.meinlschmidt.org/2011/11/01/cucumber-yajl-troubles-osx-lion/
@yaauie
Copy link

yaauie commented Oct 1, 2015

Thanks! This was useful. I've distilled it down to a one-liner to avoid the round-trip to the clipboard: https://gist.github.com/yaauie/1f483612016442aedbd1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment