Skip to content

Instantly share code, notes, and snippets.

@Dreyer
Created January 20, 2017 11:27
Show Gist options
  • Save Dreyer/0a0976f5606c0c963ab9a622f03ee26d to your computer and use it in GitHub Desktop.
Save Dreyer/0a0976f5606c0c963ab9a622f03ee26d to your computer and use it in GitHub Desktop.
[perlbrew] ld: library not found for -lgcc_s.10.4
$ cd /usr/local/lib
$ sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib
$ sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.4.dylib
@suvodeep-pyne
Copy link

Thanks! On Mac OS Mojave (10.14.2). Was trying to build wrk and was getting this error while running make. Your fix did get it going for a while but later failed with

ld: symbol(s) not found for architecture x86_64

@chrismo
Copy link

chrismo commented Jan 14, 2019

This fix worked for me as well. (10.14.2). I also had to do this install thing in this SO answer: https://apple.stackexchange.com/a/337945/165932

installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

I didn't have the symbol(s) problem that @suvodeep-pyne reports.

I found this originally posted in this issue back from 2015: Homebrew/legacy-homebrew#40653 (comment)

@elliottslaughter
Copy link

I found another answer which works for LuaJIT. If you're setting MACOSX_DEPLOYMENT_TARGET manually, change it to 10.6 or higher, the build starts working again. The SE answer may work at the moment, but the 10.4 SDK is deprecated and will likely go away permanently at some point.

LuaJIT/LuaJIT#484

@TechFounder
Copy link

I ran into this error while trying to bundle update my gems on a Rails app. For some reason it got stuck while trying to update the ffi gem:
An error occurred while installing ffi (1.11.1), and Bundler cannot continue So your symlinks worked. Thanks!

@richddr
Copy link

richddr commented Jul 16, 2019

It also worked for @simonyun

@kamil-gwozdz
Copy link

kamil-gwozdz commented Jul 29, 2019

I ran into this error while trying to bundle update my gems on a Rails app. For some reason it got stuck while trying to update the ffi gem:
An error occurred while installing ffi (1.11.1), and Bundler cannot continue So your symlinks worked. Thanks!

I run into this as well while installing ffi 1.9.10, luckily this gist helped me

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