Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'stdlib.h' file not found #83

Closed
domoritz opened this issue Oct 28, 2018 · 3 comments
Closed

'stdlib.h' file not found #83

domoritz opened this issue Oct 28, 2018 · 3 comments

Comments

@domoritz
Copy link

I'm trying to install jekyll and it fails with 'stdlib.h' file not found. Do you have suggestions for how to resolve this?

Installing commonmarker 0.17.9 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /usr/local/lib/ruby/gems/2.5.0/gems/commonmarker-0.17.9/ext/commonmarker
/usr/local/opt/ruby/bin/ruby -r ./siteconf20181027-45141-1azopun.rb extconf.rb
creating Makefile

current directory: /usr/local/lib/ruby/gems/2.5.0/gems/commonmarker-0.17.9/ext/commonmarker
make "DESTDIR=" clean

current directory: /usr/local/lib/ruby/gems/2.5.0/gems/commonmarker-0.17.9/ext/commonmarker
make "DESTDIR="
compiling arena.c
arena.c:1:10: fatal error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~
1 error generated.
make: *** [arena.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/lib/ruby/gems/2.5.0/gems/commonmarker-0.17.9 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-18/2.5.0/commonmarker-0.17.9/gem_make.out

An error occurred while installing commonmarker (0.17.9), and Bundler cannot continue.
Make sure that `gem install commonmarker -v '0.17.9' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  github-pages was resolved to 188, which depends on
    jekyll-commonmark-ghpages was resolved to 0.1.5, which depends on
      jekyll-commonmark was resolved to 1.2.0, which depends on
        commonmarker
@domoritz
Copy link
Author

I had to run sudo ln -sf /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include /usr/include to fix it.

@ppamorim
Copy link

ppamorim commented Apr 5, 2020

@domoritz Do not run this script on macOS Catalina. If you did, run this:

find usr/local/include -lname '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/*' -delete

@bobtista
Copy link

find usr/local/include -lname '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/*' -delete

My hero! Fixed an issue where VSCode debugger wouldn't run. Note I had to run this from root directory, but it worked. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants