Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[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

This comment has been minimized.

Copy link

commented Jan 13, 2019

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Mar 13, 2019

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

This comment has been minimized.

Copy link

commented Jul 5, 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!

@richddr

This comment has been minimized.

Copy link

commented Jul 16, 2019

It also worked for @simonyun

@kamil98

This comment has been minimized.

Copy link

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
You can’t perform that action at this time.