Sassc compile error when installing jekyll (macOS)

I’m running Ruby 2.6.5 (installed via Homebrew) on macOS Mojave.
When ever I run this command:

gem install --user-install bundler jekyll

The installation fails with this error:

ERROR:  Error installing jekyll:
ERROR: Failed to build gem native extension.
linking shared-object sassc/libsass.bundle
strip: object: /usr/local/lib/ruby/gems/2.6.0/gems/sassc-2.2.1/ext/libsass.bundle malformed object (unknown load command 7)

make: *** [libsass.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/lib/ruby/gems/2.6.0/gems/sassc-2.2.1 for inspection.

Results logged to /usr/local/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-18/2.6.0/sassc-2.2.1/gem_make.out

Thanks in advance for your help :slight_smile:

Hope you have read through the instructions in the official documentation:

If the issue still persists, you may want to file an issue (or comment in an existing ticket with similar problem) at

Good luck!

Yep, I followed the official instructions :confused:

I finally solved my problem by using RVM instead of the hombrew ruby.

Could you explain how you did with RVM? I’m facing the exact same issue on High Sierra. I don’t know how to use RVM insteand of Homebrew…

Honestly don’t remember at all. I’m not familiar with Ruby too so it was little bit like typiing random commands until it worked haha.

However, maybe you could try with rbenv, since there is official installation instruction of jekyll with rbenv (skip the “with Homebrew” part)

edit: make sure to uninstall the homebrew ruby before installing rbenv to avoid conflicts.

1 Like