Github Page is a service from Github that provides free static webpage hosting services, and people can use Jekyll, a content management systems recommended by Github, to generate static pages.
Although Github provides instructions to install Jekyll, the documentation is missing some important steps for Ubuntu.
Here is a typical error message after running
gem install jekyll bundler
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
current directory: /home/hoymkot/gems/gems/eventmachine-1.2.7/ext
/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20210123-16537-10hph48.rb extconf.rb
checking for -lcrypto... *** 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=/usr/bin/$(RUBY_BASE_NAME)2.7
--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
--with-crypto-dir
--without-crypto-dir
--with-crypto-include
--without-crypto-include=${crypto-dir}/include
--with-crypto-lib
--without-crypto-lib=${crypto-dir}/lib
--with-cryptolib
--without-cryptolib
/usr/lib/ruby/2.7.0/mkmf.rb:471:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/lib/ruby/2.7.0/mkmf.rb:564:in `try_link0'
from /usr/lib/ruby/2.7.0/mkmf.rb:582:in `try_link'
from /usr/lib/ruby/2.7.0/mkmf.rb:801:in `try_func'
from /usr/lib/ruby/2.7.0/mkmf.rb:1029:in `block in have_library'
from /usr/lib/ruby/2.7.0/mkmf.rb:971:in `block in checking_for'
from /usr/lib/ruby/2.7.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /usr/lib/ruby/2.7.0/mkmf.rb:331:in `open'
from /usr/lib/ruby/2.7.0/mkmf.rb:361:in `block in postpone'
from /usr/lib/ruby/2.7.0/mkmf.rb:331:in `open'
from /usr/lib/ruby/2.7.0/mkmf.rb:357:in `postpone'
from /usr/lib/ruby/2.7.0/mkmf.rb:970:in `checking_for'
from /usr/lib/ruby/2.7.0/mkmf.rb:1024:in `have_library'
from extconf.rb:8:in `block in check_libs'
from extconf.rb:8:in `all?'
from extconf.rb:8:in `check_libs'
from extconf.rb:95:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/hoymkot/gems/extensions/x86_64-linux/2.7.0/eventmachine-1.2.7/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/hoymkot/gems/gems/eventmachine-1.2.7 for inspection.
Results logged to /home/hoymkot/gems/extensions/x86_64-linux/2.7.0/eventmachine-1.2.7/gem_make.out
Successfully installed bundler-2.2.6
Parsing documentation for bundler-2.2.6
Done installing documentation for bundler after 2 seconds
1 gem installed
To fix it, we have to install the following packages.
sudo apt-get install ruby-full
sudo apt-get install ruby-dev
sudo apt-get install gcc
sudo apt-get install libffi-dev
sudo apt-get install make
sudo apt-get install g++