mysql2 gem error w/ MariaDB: need development tools [solved]
Posted: 20 Aug 2014, 22:18
I'm trying to install Redmine, and am getting stumped with installing the mysql2 gem.
Here is the pastebin from a fresh boot with the modules added manually.
And here is a summary.
Modules activated during boot time:
Manually loaded modules
The error (same occurs when running bundle install --without development test).
Googling seems to indicate that libmysqlclient-dev is the solution on Debian/Ubuntu systems, however, I'm not sure how to proceed in that direction with Slackware/Porteus.
Any help appreciated. Thanks.
Here is the pastebin from a fresh boot with the modules added manually.
And here is a summary.
Modules activated during boot time:
Code: Select all
/mnt/isoloop/porteus/base/000-kernel.xzm
/mnt/isoloop/porteus/base/001-core.xzm
/mnt/isoloop/porteus/base/002-xorg.xzm
/mnt/isoloop/porteus/base/003-lxde.xzm
/mnt/isoloop/porteus/base/04-firefox.xzm
/mnt/isoloop/porteus/base/06-libreoffice.xzm
/mnt/isoloop/porteus/modules/07-printing.xzm
Code: Select all
git-1.8.4-i486-1.xzm
imagemagick-6.8.6_10-i486-1.xzm
fftw-3.3.3-i486-1.xzm
gcc-4.8.2-i486-1.xzm
ilmbase-1.0.3-i486-1.xzm
jasper-1.900.1-i486-3.xzm
libmpc-0.8.2-i486-2.xzm
openexr-1.7.1-i486-1.xzm
mariadb-5.5.37-i486-1_slack14.1.xzm
libaio-0.3.109-i486-1.xzm
ruby-1.9.3_p484-i486-1_slack14.1.xzm
libyaml-0.1.6-i486-1_slack14.1.xzm *
tcl-8.6.1-i486-1.xzm
tk-8.6.1-i486-1.xzm
Code: Select all
guest@porteus:~$ sudo gem install mysql2 -v '0.3.16'
Fetching: mysql2-0.3.16.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking for ruby/thread.h... *** 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
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby
/usr/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 /usr/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp'
from /usr/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header'
from /usr/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /usr/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /usr/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /usr/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /usr/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /usr/lib/ruby/1.9.1/mkmf.rb:930:in `have_header'
from extconf.rb:9:in `<main>'
Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/mysql2-0.3.16 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/mysql2-0.3.16/ext/mysql2/gem_make.out
guest@porteus:~$
Any help appreciated. Thanks.