I’m not able to create project without this error when using Ubuntu image of Terraspace.
=> Creating new project called infra.
=> Installing dependencies with: bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root
will break this application for all non-root users on this machine.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
e[0m
current directory: /opt/terraspace/embedded/lib/ruby/gems/2.7.0/gems/racc-1.5.2/ext/racc/cparse
/opt/terraspace/embedded/bin/ruby -I /opt/terraspace/embedded/lib/ruby/2.7.0 -r
./siteconf20210817-71-5iz1ye.rb extconf.rb
checking for rb_ary_subseq()... *** 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
--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=/opt/terraspace/embedded/bin/$(RUBY_BASE_NAME)
/opt/terraspace/embedded/lib/ruby/2.7.0/mkmf.rb:482:in `try_do': The compiler failed to generate an
executable file. (RuntimeError)
You have to install development tools first.
from /opt/terraspace/embedded/lib/ruby/2.7.0/mkmf.rb:575:in `try_link0'
from /opt/terraspace/embedded/lib/ruby/2.7.0/mkmf.rb:593:in `try_link'
from /opt/terraspace/embedded/lib/ruby/2.7.0/mkmf.rb:805:in `try_func'
from /opt/terraspace/embedded/lib/ruby/2.7.0/mkmf.rb:1094:in `block in have_func'
from /opt/terraspace/embedded/lib/ruby/2.7.0/mkmf.rb:982:in `block in checking_for'
from /opt/terraspace/embedded/lib/ruby/2.7.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /opt/terraspace/embedded/lib/ruby/2.7.0/mkmf.rb:331:in `open'
from /opt/terraspace/embedded/lib/ruby/2.7.0/mkmf.rb:361:in `block in postpone'
from /opt/terraspace/embedded/lib/ruby/2.7.0/mkmf.rb:331:in `open'
from /opt/terraspace/embedded/lib/ruby/2.7.0/mkmf.rb:357:in `postpone'
from /opt/terraspace/embedded/lib/ruby/2.7.0/mkmf.rb:981:in `checking_for'
from /opt/terraspace/embedded/lib/ruby/2.7.0/mkmf.rb:1093:in `have_func'
from extconf.rb:6:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/opt/terraspace/embedded/lib/ruby/gems/2.7.0/extensions/x86_64-linux/2.7.0/racc-1.5.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /opt/terraspace/embedded/lib/ruby/gems/2.7.0/gems/racc-1.5.2 for
inspection.
Results logged to
/opt/terraspace/embedded/lib/ruby/gems/2.7.0/extensions/x86_64-linux/2.7.0/racc-1.5.2/gem_make.out
/opt/terraspace/embedded/lib/ruby/2.7.0/rubygems/ext/builder.rb:99:in `run'
/opt/terraspace/embedded/lib/ruby/2.7.0/rubygems/ext/ext_conf_builder.rb:48:in `block in build'
/opt/terraspace/embedded/lib/ruby/2.7.0/tempfile.rb:291:in `open'
/opt/terraspace/embedded/lib/ruby/2.7.0/rubygems/ext/ext_conf_builder.rb:30:in `build'
/opt/terraspace/embedded/lib/ruby/2.7.0/rubygems/ext/builder.rb:169:in `block in build_extension'
/opt/terraspace/embedded/lib/ruby/2.7.0/rubygems/ext/builder.rb:165:in `synchronize'
/opt/terraspace/embedded/lib/ruby/2.7.0/rubygems/ext/builder.rb:165:in `build_extension'
/opt/terraspace/embedded/lib/ruby/2.7.0/rubygems/ext/builder.rb:210:in `block in build_extensions'
/opt/terraspace/embedded/lib/ruby/2.7.0/rubygems/ext/builder.rb:207:in `each'
/opt/terraspace/embedded/lib/ruby/2.7.0/rubygems/ext/builder.rb:207:in `build_extensions'
/opt/terraspace/embedded/lib/ruby/2.7.0/rubygems/installer.rb:844:in `build_extensions'
/opt/terraspace/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.25/lib/bundler/rubygems_gem_installer.rb:66:in
`build_extensions'
/opt/terraspace/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.25/lib/bundler/rubygems_gem_installer.rb:26:in
`install'
/opt/terraspace/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.25/lib/bundler/source/rubygems.rb:186:in
`install'
/opt/terraspace/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.25/lib/bundler/installer/gem_installer.rb:54:in
`install'
/opt/terraspace/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.25/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/opt/terraspace/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.25/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/opt/terraspace/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.25/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/opt/terraspace/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.25/lib/bundler/worker.rb:62:in
`apply_func'
/opt/terraspace/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.25/lib/bundler/worker.rb:57:in `block in
process_queue'
/opt/terraspace/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.25/lib/bundler/worker.rb:54:in `loop'
/opt/terraspace/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.25/lib/bundler/worker.rb:54:in
`process_queue'
/opt/terraspace/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.25/lib/bundler/worker.rb:91:in `block (2
levels) in create_threads'
e[0me[31mAn error occurred while installing racc (1.5.2), and Bundler cannot continue.e[0m
In Gemfile:
terraspace was resolved to 0.6.13, which depends on
terraspace_plugin_azurerm was resolved to 0.3.1, which depends on
azure-storage-blob was resolved to 1.1.0, which depends on
azure-storage-common was resolved to 1.1.0, which depends on
azure-core was resolved to 0.1.15, which depends on
nokogiri was resolved to 1.12.3, which depends on
racc
================================================================
Congrats! You have successfully created a terraspace project.
Check out the created files. Adjust to the examples and then deploy with:
cd infra
terraspace up demo -y # to deploy
terraspace down demo -y # to destroy
More info: https://terraspace.cloud/