Can’t set up dockerless installation due to cppjieba_rb failing to install

I’m attempting to to setup a development environment for Discourse. When running bundle install based on the instructions at Dockerless Install Script I’m getting this error,

Building native extensions.  This could take a while...

ERROR:  Error installing cppjieba_rb:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb
/usr/bin/ruby2.3 -r ./siteconf20190215-32752-3m4rdd.rb extconf.rb
creating Makefile

current directory: /var/lib/gems/2.3.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb
make "DESTDIR=" clean

current directory: /var/lib/gems/2.3.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb
make "DESTDIR="
compiling cppjieba_rb.c
compiling internal.cc
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
Makefile:207: recipe for target 'internal.o' failed
make: *** [internal.o] Error 4

make failed, exit code 2

Gem files will remain installed in /var/lib/gems/2.3.0/gems/cppjieba_rb-0.3.3 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/cppjieba_rb-0.3.3/gem_make.out

What am I doing wrong and how can I fix the issue ?

Search for “Development howto” to find the instructions for your OS, though there is a docker based development install that is increasingly recommended.

2 Likes

@pfaffman Thank you so much for your quick response. And Yes I know, there are already docker based development install available. I’m just playing around with scripting based installation. I didn’t understand your comment Search for “Development #howto” to find the instructions for your OS. Could you please elaborate ?

FYI I’m using Ubuntu 16.04.

There are official maintained howto topics for installing a development setup here. Click the search icon to find them. There is a search icon at the top right.

4 Likes