{"id":2572,"date":"2018-05-13T20:48:07","date_gmt":"2018-05-14T01:48:07","guid":{"rendered":"http:\/\/osric.com\/chris\/accidental-developer\/?p=2572"},"modified":"2019-07-13T11:51:32","modified_gmt":"2019-07-13T16:51:32","slug":"jekyll-quick-start-error-installing-jekyll-failed-to-build-gem-native-extension","status":"publish","type":"post","link":"https:\/\/osric.com\/chris\/accidental-developer\/2018\/05\/jekyll-quick-start-error-installing-jekyll-failed-to-build-gem-native-extension\/","title":{"rendered":"Jekyll quick start: Error installing jekyll, failed to build gem native extension"},"content":{"rendered":"<p>I&#8217;m looking at starting another blog at <a href=\"http:\/\/impractical.bot\">impractical.bot<\/a>, as a home for my impractical chatbots. I thought I should check out a blog software other than WordPress, since all of my infosec colleagues make fun of me for using it. One option on my list is <a href=\"https:\/\/jekyllrb.com\">Jekyll<\/a>, which builds static sites. That&#8217;s great if you are worried about resources (i.e. super-cheap hosting) and security.<\/p>\n<p>The Jekyll site includes a 4-step quickstart. Unfortunately, it failed for me at step #1:<\/p>\n<pre><code>Error installing jekyll, failed to build gem native extension<\/code><\/pre>\n<p>I&#8217;m running this on a Fedora 27 virtual machine that I spun up for testing Jekyll:<\/p>\n<pre><code>$ cat \/etc\/system-release\r\nFedora release 27 (Twenty Seven)<\/code><\/pre>\n<p>My Ruby version is up-to-date:<\/p>\n<pre><code>$ ruby --version\r\nruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux]<\/code><\/pre>\n<p>Gem is installed and up-to-date:<\/p>\n<pre><code>$ gem --version\r\n2.6.14.1<\/code><\/pre>\n<p>I took a closer look at the details of the error message:<\/p>\n<pre><code>gcc: error: \/usr\/lib\/rpm\/redhat\/redhat-hardened-cc1: no such file or directory<\/code><\/pre>\n<p>I&#8217;m probably just missing a package, let&#8217;s see what package provides that file:<\/p>\n<pre><code>$ dnf provides redhat-hardened-cc1\r\nError: No Matches found<\/code><\/pre>\n<p>Fine, I let Google point me to a relevant StackOverflow post: <a href=\"https:\/\/stackoverflow.com\/questions\/34624428\/g-error-usr-lib-rpm-redhat-redhat-hardened-cc1-no-such-file-or-directory\">G++ error:\/usr\/lib\/rpm\/redhat\/redhat-hardened-cc1: No such file or directory<\/a><\/p>\n<pre><code>$ sudo dnf install redhat-rpm-config<\/code><\/pre>\n<p>I tried again:<\/p>\n<pre><code>$ sudo gem install bundler jekyll<\/code><\/pre>\n<p>It still failed, but with a different error:<\/p>\n<pre><code>make: g++: Command not found<\/code><\/pre>\n<p>I installed gcc-c++:<\/p>\n<pre><code>$ sudo dnf install gcc-c++<\/code><\/pre>\n<p>I tried to install Jekyll yet again:<\/p>\n<pre><code>$ sudo gem install bundler jekyll<\/code><\/pre>\n<p>That worked!<\/p>\n<p>The following steps in Jekyll&#8217;s quickstart worked too:<\/p>\n<pre><code>$ jekyll new my-awesome-site\r\n$ cd my-awesome-site\r\n$ bundle exec jekyll serve<\/code><\/pre>\n<p>I copied my <code>~\/my-awesome-site\/_site<\/code> folder to my document root (this can be automated with Jekyll, but I&#8217;m not there yet), and now, voila! my site is live:<br \/>\n<a href=\"http:\/\/impractical.bot\">http:\/\/impractical.bot<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m looking at starting another blog at impractical.bot, as a home for my impractical chatbots. I thought I should check out a blog software other than WordPress, since all of my infosec colleagues make fun of me for using it. One option on my list is Jekyll, which builds static sites. That&#8217;s great if you &hellip; <a href=\"https:\/\/osric.com\/chris\/accidental-developer\/2018\/05\/jekyll-quick-start-error-installing-jekyll-failed-to-build-gem-native-extension\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Jekyll quick start: Error installing jekyll, failed to build gem native extension<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[426,499,498,404,421],"class_list":["post-2572","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-fedora","tag-gem","tag-jekyll","tag-ruby","tag-virtualbox"],"_links":{"self":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/2572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/comments?post=2572"}],"version-history":[{"count":4,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/2572\/revisions"}],"predecessor-version":[{"id":3073,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/2572\/revisions\/3073"}],"wp:attachment":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/media?parent=2572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/categories?post=2572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/tags?post=2572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}