Jekyll LoadError: libsass.so
A very brief post but this has been bugging me for a while and I finally solved it. I can’t remember how I got into this situation, but when running bundle exec jekyll serve
I was met with the following error:
bundler: failed to load command: jekyll (/home/llwyd/.local/share/gem/ruby/3.3.0/bin/jekyll)
…
libsass.so: cannot open shared object file: No such file or directory. (LoadError)
I’d searched around and couldn’t really find anything that worked for me. I’d installed libsass
from the Arch Linux repos, I’d reinstalled the gems, nothing seemed to work. Having a look round my gem file I noticed that the gem version was configured as such:
gem "jekyll", "~> 4.2.0"
I had a look on the Jekyll releases page and saw that there was a release for 3.10.0 1. I changed my gemfile to use this version:
gem "jekyll", "~> 3.10.0"
Then I retried the aforementioned bundle command:
Conversion error: Jekyll::Converters::Markdown encountered an error while converting ‘_posts/2021-05-14-hello-world.markdown’: kramdown-parser-gfm
A new error! A quick search on Stack Overflow revealed the solution was to add this missing gem to my gemfile2:
gem "kramdown-parser-gfm"
After running bundle install
again it installed the missing gem. I once again attempted jekyll bundle exec serve
and a local version of my blog sprang into life again! Hurrah!