Unable to install Jekyll on Mac OS 10.15

I’ve tried using all of the guides and other posts for tips on installing this, but I cannot get past these errors. I’ve installed the Xcode developer tools … but wondering, is it reference different ‘development tools’?

Any tips or ideas? I’ve also checked my ruby install (running 2.6.3) and it looks fine.

    ERROR:  Error installing jekyll:

    ERROR: Failed to build gem native extension.

        current directory: /Library/Ruby/Gems/2.6.0/gems/eventmachine-1.2.7/ext

    /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 ./siteconf20201016-50364-e4emoh.rb extconf.rb

    *** extconf.rb failed ***

    Could not create Makefile due to some reason, probably lack of necessary

    libraries and/or headers.  Check the mkmf.log file for more details.  You may

    need configuration options.

    Provided configuration options:

    --with-opt-dir

    --without-opt-dir

    --with-opt-include

    --without-opt-include=${opt-dir}/include

    --with-opt-lib

    --without-opt-lib=${opt-dir}/lib

    --with-make-prog

    --without-make-prog

    --srcdir=.

    --curdir

    --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)

    --with-ssl-dir

    --without-ssl-dir

    --with-ssl-include

    --without-ssl-include=${ssl-dir}/include

    --with-ssl-lib

    --without-ssl-lib=${ssl-dir}/lib

    --with-openssl-config

    --without-openssl-config

    --with-pkg-config

    --without-pkg-config

    /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)

    You have to install development tools first.

    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in `block in try_link0'

    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'

    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in `try_link0'

    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in `try_link'

    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:672:in `try_ldflags'

    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1832:in `pkg_config'

    from extconf.rb:65:in `pkg_config_wrapper'

    from extconf.rb:92:in `<main>'

    To see why this extension failed to compile, please check the mkmf.log which can be found here:

      /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/eventmachine-1.2.7/mkmf.log

    extconf failed, exit code 1

    Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/eventmachine-1.2.7 for inspection.

    Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/eventmachine-1.2.7/gem_make.out

    1 gem installed

What command are you using to install Jekyll? It looks like it is trying to install Gems under /Library, but that would require root access (which is not recommended). The docs recommend installing Gems in your user directory using the --user-install option. I.e.:

gem install --user-install bundler jekyll

Full doc at:

1 Like

Yes agree with above recommendation and steps in that page linked.

Yeah … we get the same error when we try and do a --user-install … fwiw. :frowning:

Searching around for “extconf.rb failed”, I found this issue thread where they examined the mkmf.log and found that Xcode’s tools still required license acceptance:

https://github.com/reenhanced/gitreflow/issues/178#issuecomment-352552181

Maybe the same problem? Or maybe examining mkmf.log would help?

In the middle of the error trace is says the reason it can’t installed the extconf.rb is developer tools.

So try

xcode-select --install

Based on answer Jekyll won't install on OSX High Sierra out the box

And step 4 here

Did this get resolved? What worked?

So, in our case … our Xcode developer tools install was borked …

We did a specific Xcode-select
‘xcode-select -s /Applications/Xcode.app/Contents/Developer’

then did a CMD-Line confirm of the license …
‘xcodebuild -license’

And then finally, the install completed … Such a PITA.

Hope that helps.

1 Like

Good to hear it worked

sudo xcode-select --install
sudo xcodebuild -license

Just to do the installation is not enough, you have to agree to the license. So both steps are required.

It worked for me, thanks