This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
Mysql chef gem compilation error #13
Open
Description
When running mariadb::ruby I get this error:
* chef_gem[mysql] action install
================================================================================
Error executing action `install` on resource 'chef_gem[mysql]'
================================================================================
Gem::Installer::ExtensionBuildError
-----------------------------------
ERROR: Failed to build gem native extension.
/opt/chef/embedded/bin/ruby extconf.rb
checking for mysql_ssl_set()... *** 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/chef/embedded/bin/ruby
--with-mysql-config
--without-mysql-config
/opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:476:in `try_link'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:619:in `try_func'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:894:in `block in have_func'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:893:in `have_func'
from extconf.rb:45:in `<main>'
Gem files will remain installed in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mysql-2.9.1 for inspection.
Results logged to /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mysql-2.9.1/ext/mysql_api/gem_make.out
Cookbook Trace:
---------------
/root/chef-solo/cookbooks-2/mariadb/recipes/ruby.rb:34:in `from_file'
Resource Declaration:
---------------------
# In /root/chef-solo/cookbooks-2/mariadb/recipes/ruby.rb
34: chef_gem 'mysql'
Compiled Resource:
------------------
# Declared in /root/chef-solo/cookbooks-2/mariadb/recipes/ruby.rb:34:in `from_file'
chef_gem("mysql") do
provider Chef::Provider::Package::Rubygems
action :install
retries 0
retry_delay 2
guard_interpreter :default
package_name "mysql"
version "2.9.1"
cookbook_name :mariadb
recipe_name "ruby"
end
Is there a way to fix this? Maybe I'm missing some dependencies?
Metadata
Metadata
Assignees
Labels
No labels