Skip to content

Instantly share code, notes, and snippets.

@bfontaine
Last active May 9, 2022 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bfontaine/7c9b0013909856178245a18921715e4b to your computer and use it in GitHub Desktop.
Save bfontaine/7c9b0013909856178245a18921715e4b to your computer and use it in GitHub Desktop.
Fix g++-5 error when installing eventmachine or sassc gems

Ok this is ugly but it fixes the issue and I haven’t found a better solution.

You have to have g++ installed. Then make a symlink from g++-5 to g++:

cd /usr/bin
sudo ln -s $(which g++) g++-5

And try bundle install again.

In Gemfile:
minima was resolved to 2.5.1, which depends on
jekyll-feed was resolved to 0.15.1, which depends on
jekyll was resolved to 4.2.1, which depends on
em-websocket was resolved to 0.5.3, which depends on
eventmachine
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/linuxbrew/.linuxbrew/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/ext
/home/linuxbrew/.linuxbrew/opt/ruby/bin/ruby -I /home/linuxbrew/.linuxbrew/Cellar/ruby/3.1.2/lib/ruby/3.1.0
-r ./siteconf20220509-1654892-yyv7bw.rb extconf.rb
creating Makefile
current directory: /home/linuxbrew/.linuxbrew/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/ext
make DESTDIR\= clean
current directory: /home/linuxbrew/.linuxbrew/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/ext
make DESTDIR\=
compiling ./libsass/src/ast.cpp
make : g++-5 : commande introuvable
make: *** [Makefile:238 : ast.o] Erreur 127
make failed, exit code 2
Installing eventmachine 1.2.7 with native extensions
Installing sassc 2.4.0 with native extensions
Fetching em-websocket 0.5.3
Installing em-websocket 0.5.3
Fetching jekyll-sass-converter 2.1.0
Installing jekyll-sass-converter 2.1.0
Fetching jekyll 4.2.1
Installing jekyll 4.2.1
Fetching minima 2.5.1
Installing minima 2.5.1
Bundle complete! 3 Gemfile dependencies, 32 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment