gem install jekyll: make failed, exit code 2 on macos

901 views Asked by At

I was working perfectly fine with jekyll, until I updated my mac to MAC-OS-BIG-SUR.

I am following this tutorial.

When I run this command sudo gem install -n /usr/local/bin/ jekyll It returns the following error:

(base) Carloss-MacBook-Pro:Desktop cmougan$ sudo gem install -n /usr/local/bin/ jekyll
Ignoring commonmarker-0.17.13 because its extensions are not built. Try: gem pristine commonmarker --version 0.17.13
Ignoring eventmachine-1.2.7 because its extensions are not built. Try: gem pristine eventmachine --version 1.2.7
Ignoring http_parser.rb-0.6.0 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.6.0
Ignoring racc-1.5.2 because its extensions are not built. Try: gem pristine racc --version 1.5.2
Ignoring sassc-2.4.0 because its extensions are not built. Try: gem pristine sassc --version 2.4.0
Ignoring unf_ext-0.0.7.7 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.7
ERROR:  Error installing jekyll:
    ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.6.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210426-30151-khq8ly.rb extconf.rb
creating Makefile

current directory: /Library/Ruby/Gems/2.6.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR=" clean

current directory: /Library/Ruby/Gems/2.6.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
make: *** No rule to make target `/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin20/ruby/config.h', needed by `ruby_http_parser.o'.  Stop.

make failed, exit code 2

Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/http_parser.rb-0.6.0 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/http_parser.rb-0.6.0/gem_make.out

Some of my installation settings

which ruby
#/usr/bin/ruby

echo $PATH

/Users/cmougan/.gem/ruby/3.0.0/bin:/usr/local/opt/ruby/bin:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.0.0/bin:/Users/cmougan/.gem/ruby/2.6.0/bin:/Users/cmougan/.gem/ruby/2.6.0/bin:/Users/cmougan/.gem/ruby/2.6.0/bin:/Users/cmougan/.gem/ruby/X.X.0/bin:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.0.0/bin:/Users/cmougan/.rbenv/bin:/Users/cmougan/.rbenv/bin:/Users/cmougan/opt/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/Users/cmougan/opt/anaconda3/bin:/Users/cmougan/opt/anaconda3/condabin:/Applications/Julia-1.1.app/Contents/Resources/julia/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
0

There are 0 answers